Slashdot Mirror


What Today's Coders Don't Know and Why It Matters

jfruhlinger writes "Today's programmers have much more advanced languages and more forgiving hardware to play with — but it seems many have forgotten some of the lessons their predecessors picked up in a more resource-constrained era. Newer programmers are less adept at identifying hardware constraints and errors, developing thorough specifications before coding, and low-level skills like programming in assembly language. You never know when a seemingly obsolete skill will come in handy. For instance, Web developers who cut their teeth in the days of 14.4 Kbps modems have a leg up in writing apps for laggy wireless networks."

68 of 368 comments (clear)

  1. Newsflash by Anonymous Coward · · Score: 2, Insightful

    Experienced people have experience in things they have experienced

    1. Re:Newsflash by canadian_right · · Score: 2

      newsflash - many schools no longer teach low level programming.

      If you want to get good, truly good, you'll have to learn some of this on your own. And in the good old days all you had to do was count up clock cycles and you were done. Modern processors with multi-stage pipe-lines and out of order execution are much harder to hand optimise. When a pipe-line stall is very expensive you don't worry so much about clocks.

      --
      Anarchists never rule
  2. Fashion by funkatron · · Score: 3, Informative

    So your particular skillset has fallen out of vogue for a while; it happens. If this stuff is useful, it'll come back. For instance, a lot of the hardware related skills mentioned are still around, they're just considered to be a specialisation these days, in most situations it's safe to assume that the hardware either performs within spec or that the lower layer (OS etc) is dealing with any irregularities.

    --
    "Welcome to our world. We are the wasted youth. And we are the future too." Yes, I know these are stupid lyrics.
    1. Re:Fashion by snowgirl · · Score: 2

      So your particular skillset has fallen out of vogue for a while; it happens. If this stuff is useful, it'll come back. For instance, a lot of the hardware related skills mentioned are still around, they're just considered to be a specialisation these days, in most situations it's safe to assume that the hardware either performs within spec or that the lower layer (OS etc) is dealing with any irregularities.

      I'm actually a youngin' who took interest in the lower layers, and developed my skill set around that. I'm kind of waiting for the oldies to retire/kick the bucket and open up more openings for people like me. I anticipate that I'll be one of the hawt shite programmers once the population of systems programmers starts dwindling...

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    2. Re:Fashion by lgw · · Score: 2

      Pretty much. There are very few comp sci programs these days that teach anything relevent to systems programming, and kernel jobs still pay nicely as a result. I stay away from the kernel stuff myself, as I find it quite tedious, but there are plenty of user-mode systems jobs around in Silly Valley - not so much elsewhere. (Stay away from embedded though, that field pays crap for some reason I've never grasped).

      We're re-inventing the mainframe all over again, and that promises to be a lot of work.

      --
      Socialism: a lie told by totalitarians and believed by fools.
  3. The problem is by geekoid · · Score: 4, Insightful

    they aren't trained to engineer software, and the industry hasn't incorporated good engineering practices.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    1. Re:The problem is by ADRA · · Score: 2

      Coming from a legacy modernization project, just because people wrote programs 10, 20, 30 years ago doesn't mean that the code was good, or that the developers knew what they were doing. One would hope that decades of development experience would teach a well rounded set of skills and often it does.

      To sum up, a 5 year out of school brat learning technology X is any less capable than a 5 year out of school brat learning technology Y in the 80's/90's.

      --
      Bye!
    2. Re:The problem is by wrook · · Score: 4, Interesting

      There aren't good engineering practices in software. This is why I abjectly refuse to call myself an engineer (that and I'm *not* an engineer). Can you tell me with a known degree of certainty the probability that a software component will fail? What procedures would you put into place to give you that number (keeping in mind the halting problem)? What procedures would you put into place to mitigate those failures? Because I'm drawing a big gigantic blank here.

      Look, I'm all for using "Software Engineering" practices. Personally, in my career I have championed TDD, peer review, acceptance tests written in advance by someone other than the programmers, etc, etc, etc. But this isn't engineering. The best I can tell anyone is, "Hey, it doesn't break on *my* machine. Yeah, I think the probability of it breaking on your machine is 'low'. No, I wouldn't like to specify a number, thank you very much." Why do you think software never comes with a warrantee?

      I often wonder what we could do to actually make this an engineering discipline. For one thing, I think we really need to invest in developing stochastic testing techniques. We need to be able to characterise all the inputs a program can take and to test them automatically in a variety of different ways. But this is the stuff of research. There are some things we can do now, but it's all fairly naiscent technology. Maybe in 20 years... :-P

    3. Re:The problem is by TheLink · · Score: 3, Insightful

      Years ago people could already look at BIND, Sendmail and other "ISC goodness" and work out the probability that they would have at least one exploitable vulnerability a year (>90%) ;). http://www.isc.org/advisories/bind?page=8

      The problem is many people (bosses, project managers, developers, etc) don't understand the big difference between "Software Engineering" and say Civil Engineering.

      In Civil Engineering creating all the blueprints and plastic models necessary is typically 1/10th the cost of building the "Real Thing", and make up a smaller portion of the total cost.

      For software, creating the source code (drafts, blueprints) costs more than 100 times the cost of "make all" (building the "Real Thing"), and form a large portion of the total cost.

      So if "stuff happens" and you need to spend 50% more to fix the design, with Civil Engineering the bosses are more likely to agree (unhappily) to "fix the design", because nobody can afford to build the whole building a few times till you get the design right...

      Whereas with "Software Engineering", the bosses are more likely to go "Ship and sell it, we'll fix it in the next release!".

      And if you're a boss, you'd likely do the same thing ;).

      So even if you could work out the probabilities of some software component failing, nobody would care. Because all you need to work out is: which bugs need to be fixed first, out of the hundreds or thousands of bugs.

      That changes if you are willing to spend 10x the cost (in $$$ and time) of creating each internal "release". By the time the 10th (final) release is written and tested (specs remaining the same - no features added) the stuff should work rather reliably. But you'd be 5 years behind everyone else...

      --
    4. Re:The problem is by omglolbah · · Score: 2

      Mostly that is not in there because the software in question is not 'critical' and nobody wants to pay for the testing.

      I do work in the oil/gas industry and for ESD (emergency shutdown) systems we now have to have SIL Certified controllers and software. This means libraries have to be SIL tested and certified along with all hardware used.

      http://en.wikipedia.org/wiki/Safety_Integrity_Level

      Is this the kind of failure rate and safety factoring you are referring to? :)

    5. Re:The problem is by TheRaven64 · · Score: 2

      It's there. I had to study this stuff as an undergrad and then was in a room full of people doing it in more detail for my PhD. If you really need software that is provably correct, then you can get it. Of course, that doesn't mean any more than it does in engineering: remember Tacoma Narrows? Specifications missing an important detail can still mean a disaster, even if the engineering is perfect.

      The problem is cost. Several of the people in the verification group during my PhD were working with industry (companies like Rolls Royce, who actually do require this level of software for controlling jet engines, where a small bug can mean lots of people die). After three years, they'd have produced about as much code - working in a small team - as I could produce in a weekend of hacking. The difference is that you could confidently trust your life to their code.

      As with everything else, it's a question of risk / reward. If a software failure can cost $1M, then spending an extra $10M verifying it probably isn't worth it. For something like a stealth fighter, where a glitch in the flight control system can cost you a $20B aircraft, plus a tactical advantage, it is worth it. The same is true of safety critical systems in commercial aircraft and for some medical applications. For anything else, it generally isn't.

      It's also worth realising how much more complex modern software is than any physical object. If you build a bridge, you have a few thousand different types of component, interacting with maybe a dozen others each. This lets you model the global effects. With software, you can easily have tens of thousands of components all potentially interacting with hundreds of others. This is one of the main reasons for the drive towards modularity in software engineering: the desire to reduce the number of possible interactions. Unfortunately, then some idiot came up with the idea of exposing threads as an abstraction above the kernel and it all fell apart.

      --
      I am TheRaven on Soylent News
  4. It doesn't matter. by man_of_mr_e · · Score: 4, Insightful

    "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" - Donald Knuth

    Most developers will never need for their apps to run in constrained environments, and most employers don't want to spend money to eek out performance when average performance is perfectly fine.

    Too many programmers get caught up in trying to make something the fastest, or most memory efficient, or makes the best use of bandwidth. When most of the time, it just doesn't matter. Such things are expensive, and in the long run it's cheaper to be fast and sloppy than slow and lean.

    1. Re:It doesn't matter. by jackb_guppy · · Score: 4, Informative

      I love D Knuth and have read is sorting and searching book many time over, always finding good times.

      SPEED does mater and so does SIZE and BANDWIDTH. It is important to design things right the first time versus loops and loops of daily optimization that must code is written in today. The understanding of record-locks, index optimization and other multiplexing methods are needed today. I see too much of sucking a 1+ million peaces into memory to find 1 item, "Because it is fast".

      Yes this sounds like "get of my grass", but "fast and sloppy", is a waste on everyone's resources not just a single computer.

    2. Re:It doesn't matter. by Mitchell314 · · Score: 4, Insightful

      You want spend the most effort to conserve the most expensive resource. And that is not the cpu, ram, or disk time. It's human time. Hell, even working for low wage, a person is expensive. Thus the most effort should be put in having them do the least effort. Unless you have a case where the hardware time is getting expensive, but that's the exception as hardware costs go down while salary doesn't.

      And no, that's not an excuse to be sloppy. "Back in the ancient days" it was important to write good code for the limited resources. Now you still need to write good code, but the constraints are relaxed. But we still need code that is maintainable, dependable, extendable, flexible, understandable, etc.

      --
      I read TFA and all I got was this lousy cookie
    3. Re:It doesn't matter. by billcopc · · Score: 3, Interesting

      Is it truly cheaper to be sloppy ? Hardware keeps getting cheaper and faster, sure, but not matching the pace at which code is getting slower.

      Just look at your average web server. Today's machines are over a hundred times faster than they were 10 years ago, and we're not doing anything significantly different. Serving up text and graphics, processing forms, same old b.s. So then, why aren't we serving 100 times more pages per second ? Apache keeps getting fatter, PHP seems to do a "sleep(100)" after each line, and don't even get me started on Ruby.

      There was a time, not so long ago, when I would spend an hour tweaking an oft-used assembler loop, and the end result was a 3x speedup or more. I'm not saying we should rewrite everything in assembler, but I think we're become so far removed from the actual machine, relying on the compiler to "do the right thing", that people don't even have the slighest clue how to distinguish fast code from slow. How often do we use benchmarks to test different solutions to the same problem ? Almost never! People bust out the profiler only when things go wrong, and even then they might say "just add CPU/Ram/SSD" and call it a day.

      Or, if we must motivate the hippies, call it "green optimisation". Yes, faster code finishes quicker, using less power to complete the same job. If we're dealing with web servers, faster code would require less cluster nodes, or maybe free up some CPU time for another VM on the host, and those 60A circuits aren't cheap either. If spending an extra day optimizing my code could save me $2000 / mo off my colo bill, I'd be a fool not to invest that time.

      --
      -Billco, Fnarg.com
    4. Re:It doesn't matter. by Anonymous Coward · · Score: 2, Insightful

      The thing is people use that quote to be *LAZY*. Yeah most of the time it doesnt matter. But guess what when it does you may find yourself rebuilding an entire framework because you made just plain stupid mistakes and LOTS of them.

      For someone who understands what optimizations are available vs your code jockey who just whips up some code the difference is miles different.

      I used to think the same way. "It doesnt matter much" but then I realized it does matter. It matters a lot. Think if all of your programs started up 10 seconds faster. Now multiply that by the millions of times programs are run every day.

      Individually on single runs it doesnt matter much. But that time debt builds up.

      Think about this. Take the standard crt function printf. One of the more used functions out there. What if it ran 2x as fast. What sort of impact in the world would that make?

    5. Re:It doesn't matter. by Anonymous Coward · · Score: 2, Insightful

      And all those users sitting waiting 5 minutes for the page to load, for the data to completely draw, or whatever?

      You do read thedailywtf.com, don't you? Plenty of stories where a 'quick app' becomes mission critical, and can't handle slightly (?) larger datasets.

      Well, those aren't _our_ users.. their time is _free_. And they can _leave_ if they don't like it. ....

    6. Re:It doesn't matter. by antifoidulus · · Score: 3, Interesting

      It all comes down to scale ultimately. It's rare in the computer science field to see code that runs x% slower than a more optimized version, at both very small and very large scales. Coders that don't know how the hardware and lower level software interfaces work tend not to write very scalable code because they have no ideas how the computers actually work, and even less of an idea of how a lot of them work.

      As an example, consider a database with very poorly designed primary and secondary keys. This choice will either:

      a) not matter in the least because the tables are so small and queries so infrequent that the other latencies(e.g network, hard disk etc) will dwarf the poor key choice or

      b) Will quickly make the entire database unusable as the time it takes for the database software to search through every record for things matching the given query takes forever and just kills the disk.

      I've seen plenty of (b), largely caused by total ignorance of how databases, and the hard disks they live on, work. The indices are there not only for data modeling purposes, but also to minimize the amount of uber expensive disk I/O necessary to perform most queries. And while you may be in situation (a) today, if your product is worth a damn it may very well get bigger and bigger until you end up in (b), and by the time you are in (b) it may end up being very, very expensive to re-write the application to fix the performance issues(if they can be fixed without a total re-write)

      Anyone who codes should have at least a fundamental grasp of computer architecture, and realize what computer hardware is good, and bad at. That isn't "premature optimization" as you seem to think it is, it is a fundamental part of software design. "Premature optimization" in this context means things like changing your code to avoid an extra integer comparison or two, that kind of thing. It is not,"lets just pretend the computer is a magic device and ignore performance concerns because it's easier".

    7. Re:It doesn't matter. by maxwell+demon · · Score: 2

      You seem to have this mental model that more efficient code must take longer to develop. But not making bad decisions may take up exactly zero time if you are in the habit of making good decisions.

      A simple example is the ordering of loops. Exchanging the order of loops after the fact may take extra time, but writing the loops in the right order from the start doesn't take more time than writing them in the wrong order.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    8. Re:It doesn't matter. by tombeard · · Score: 2

      So to save one developer day we sacrifice 5 user minutes per day X 250 days per year X 100000 users? I know I have been the victim of this.

      --
      The reason we subjugate ourselves to law is to better procure justice. If law does not accomplish this purpose then it m
    9. Re:It doesn't matter. by Anonymous Coward · · Score: 3, Insightful

      Nobody is suggesting you optimise to shave off the odd byte or machine cycle.

      However, you should optimise for the task in the sense of picking appropriate algorithms and structures.

      What I've seen in industry is that a lot of developers pay attention neither to elegance nor efficiency. And this really bites you in the pants when the code meets real data.

      Anyway, once you decide to ignore resource constraints in your engineering, what on earth is left that's challenging? Honestly, you might as well flip burgers for a living if you're going to do things that way.

    10. Re:It doesn't matter. by greenbird · · Score: 2

      When most of the time, it just doesn't matter. Such things are expensive, and in the long run it's cheaper to be fast and sloppy than slow and lean.

      You have GOT to be in management. The vast majority of the cost of a software project go into the support. If it cost twice as much to do it right up front you will save 10 times that amount in support cost down the road. You can then spend that money evolving and improving your software rather than being forced to spend it trying to keep it going day to day. Attitudes like your's are the number one thing wrong with the software industry (well, besides software patients but that's another argument).

      --
      Who is John Galt?
    11. Re:It doesn't matter. by Vellmont · · Score: 5, Insightful


      Today's machines are over a hundred times faster than they were 10 years ago

      The raw CPU power times the amount of cores is 100 times faster. How much faster is the I/O? Serving up web pages is mostly about I/O. I/O from the memory, I/O from the database, I/O to the end user. The CPU is usually a small part of it.

      You actually sound like a perfect example of what the article is talking about. People who don't understand where the bottlenecks lie. Hell, it even mentioned the misunderstanding of the I/O bottlneck that exists today.

      --
      AccountKiller
    12. Re:It doesn't matter. by Weegee_101 · · Score: 2

      "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" - Donald Knuth

      Most developers will never need for their apps to run in constrained environments, and most employers don't want to spend money to eek out performance when average performance is perfectly fine.

      Too many programmers get caught up in trying to make something the fastest, or most memory efficient, or makes the best use of bandwidth. When most of the time, it just doesn't matter. Such things are expensive, and in the long run it's cheaper to be fast and sloppy than slow and lean.

      Do you even know what the full quote is, or what the paper Donald Knuth wrote that in is about?

      Here is the full quote:

      "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%. A good programmer will not be lulled into complacency by such reasoning, he will be wise to look carefully at the critical code; but only after that code has been identified." - Donald Knuth

      So the quote you've used to back yourself up is completely and utterly against your argument. It actually makes a point for the skills that you say don't matter. I really can't even believe people modded this as insightful.....

    13. Re:It doesn't matter. by mcrbids · · Score: 2

      Hell, even working for low wage, a person is expensive. Thus the most effort should be put in having them do the least effort.

      Yeah, but here's where it gets weird: Software is highly valuable because it allows a single person to do the same task a very large number of times.

      Because of this, it's not like stacking logs or gluing tile. If you have sufficient leverage, you can spend a stupid amount of money getting everything just right and profit immensely from it. (See: Apple)

      On the other hand, most software isn't leveraged nearly as much. Most software is "commodity" and doesn't represent a huge leverage of anybody's skill. And that's why, in some environments, egging out the last ms of performance out of an algorithm is critical, and in others it's a total waste of money.

      The important part is to determine just how important the possible performance increase actually might be.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    14. Re:It doesn't matter. by omglolbah · · Score: 2

      Sadly the person signing the developer's time-sheet isnt usually the one incurring the cost down the line...

      That kind of disconnect makes for shitty code and shitty efficiency overall :(

    15. Re:It doesn't matter. by TheRaven64 · · Score: 2

      You might want to look at the assembly your compiler generates. There is absolutely no speedup from doing this replacement if you are using a modern compiler, because the compiler will already be replacing all printf() calls with constant arguments with puts (or even putchar()). If you're interested, then look at LLVM's simplify libcalls pass. Search for printf in that file and you'll see the transforms it does there. It also simplifies a number of other libcalls. This means that it's fine to use [f]printf() everywhere - the compiler will transform it into puts(), putchar(), putc(), or fwrite() in cases where that is appropriate. Pretty much any modern compiler will do this. The behaviour of these functions is specified by the standard, so it's a safe replacement.

      --
      I am TheRaven on Soylent News
    16. Re:It doesn't matter. by man_of_mr_e · · Score: 2

      While i'm not disagreeing with you, I think it's a lot more complex than that. If you're talking commands in an app, then certainly there are times where effectively instant actions are beneficial, but when moving from app to app most people take a few moments to readjust themselves to a different UI and figure out how they're going to go about doing their task.

      Let me give you an example. A company I worked at was complaining that their terminal based app (running on a Unix system) was too slow, and that it took too long after finishing a screen before they could move on to the next screen.

      The company spent about $30,000 in hardware and software changes to get the screen take "near instant" time, and they found that the workers were no more productive. They did exactly the same amount of work in exactly the same amount of time.

      The reason was that after they entered a screen, they had to shift their paperwork and move to the next folder of data. By the time they did that, the screen was finished updating and ready for the next work item. So in other words, wasted money.

  5. Re:tl;dr by cptdondo · · Score: 2

    I don't miss the days of my PDP-8 programming. OTOH, I do a lot of embedded stuff as a hobby these days, and it's incredible to think that a lot of the newer programmers think you need huge resources to do even minor tasks. I sometimes choke at the megabytes of dependencies sucked into a small piece of code... Anyway, it's a bit of "Get off my lawn" and a bit of "when the car starts skidding, you really do need to understand oversteer, understeer, and torque steer to keep from getting wrapped around that light pole." And yes, I do know that torque steer has little to do with the first two. :-)

  6. Maybe having a conservative mindset helps.. by JeremyMorgan · · Score: 2

    but other than that I fail to see the outrage. I also don't see a lot of value in learning things you won't likely need to use. Whats the cost/benefit to learning and mastering assembly if you aren't going to need it? Building software as if you have low resources is fine, so long as you aren't compromising quality to make sure it will run on an archaic hardware. Making things as lean and fast as you can is always plus... if you have the time. Which is another thing today's programmers deal with more: insane deadlines. Expectations are growing and deadlines are getting shorter, and today's programmers (unfortunately) cut a lot of corners and don't get the chance to truly optimize something, just so they can get it out the door.

  7. Lessons from the Old and Wise by AirStyle · · Score: 4, Funny

    I do agree with you. I'm new to programming myself, but I've always felt the need to learn more about the computer than just the high-level language. That's why I want to take up PERL. Apparently, there's still a strong Ruby community out there, so I might take that up as well. On top of that, I like to plan out my programs. I like to know exactly what it will do before I do it, which may require writing out the code first. I'm only two years into programming, so I still have a long way to go. I just want to make sure that what I do is very efficient so that all my future supervisor has to do is sit back and trust me.

    1. Re:Lessons from the Old and Wise by garyebickford · · Score: 2

      Or go the other way - toward Church instead of Turing - check out Erlang or Haskell or Ocaml. In fact I recommend learning at least one of the above (I personally like Erlang, but that's just me) just to get a different perspective on computation than any of the 'classic' imperative, memory-location-oriented languages.

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  8. IDE debugging really isn't that bad by jader3rd · · Score: 2

    One of those interviewed in the article complained about the fact that modern day programmers try to solve the problem through an IDE or debugger, instead of putting in statements which change the output of the program. They wanted printf debugging. While I do value a good tracing subsystem, I for one, am grateful for modern debuggers which let me view the state of the system without having to modify/redeploy the code.

    1. Re:IDE debugging really isn't that bad by wrook · · Score: 2

      I didn't read TFA, but here are some thoughts to consider. printf debugging is only useful if you have an uncomplicated subsystem. You have to be able to quickly find the area where the problem may lie. You have to be able to easily identify and set up the scenario that is causing the problem. You have to easily be able to modify the code, redeploy and run it. I find that a lot of people will say, "My system is too complex for that". What they don't quite grasp is that their system is broken.

      If you need a debugger to evaluate the system when it enters a broken state, your software composition is likely the fault. You should be able to write a quick script that sets up the circumstance that you are interested in. If you have to actually run the entire software to get into this situation, they you likely have serious coupling issues that you should resolve.

      The same is true for tracing. Generally tracing is useful when you can't understand the code path that led to it arriving at a particular location. This probably means that either your interfaces are confusing, or you have poor cohesion. You may have issues where functions are doing more than one task, or you have many poorly factored methods that copy and paste similar code.

      For me one of the biggest incentives to use a debugger is because the build system is broken. I can't set up scenarios to test because it takes an hour to build and deploy the system. Again, this could be due to coupling/cohesion problems in the software composition, but it is often just laziness when creating the build system. Having a continuous integration/build system is extremely helpful.

      When you are working with a legacy system, sometimes there isn't much you can do. The pooch was screwed years ago and apart from rewriting the whole damn thing, you just aren't going to get there from here. The problem comes when the programmers don't even realise the inherent problems in their system. They have 2 million lines of horribly organised libraries and code copy and pasted all over the place. They have 200 line long (or more!) methods that duplicate functionality from a hundred other 200 line long methods. The debugger lets them do this and stay sane.

      Taking away the debugger and telling them to use printfs (with no tracing subsystem!) shows them the hell that they have created. Of course, even then they often don't take the hint...

  9. In my day by alostpacket · · Score: 4, Funny

    we had to code uphill in 10 feet of snow on an abacus using roman numerals.

    --
    PocketPermissions Android Permission Guide
    1. Re:In my day by sconeu · · Score: 2

      You had Roman numerals? You lucky, jammy, bastard! I'd have killed for Roman numerals. We had to use tally marks. And if we didn't put the slash to mark the fifth, the compiler got confused and core dumped on us!

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  10. Re:tl;dr by coolmadsi · · Score: 2

    Yeah, that was my first thought. I'm pretty long in the tooth myself, but for the most part, if something has been forgotten, it's because it is no longer of use.

    Sure things come back (the mobile app market is a good example), and this becomes a great opportunity for the older generation to pass on information to the younger. But I'm not going to miss the days where you had to figure out how to handle your data set when you couldn't use more than 64k of consecutive memory.

    Thing is, a lot of the stuff that was required knowledge and isn't now is probably unlikely to come up very often any more. So knowing it internally isn't as important as it can just be looked up for a one off use. Sure, maybe a basic overview understanding of some of the potential issues may be useful, but details of something that you might use once and not again that can be looked up isn't.

    I think my phone has a bit over 200MB of memory, so any code optimisations for a computing device with less than that aren't as important as they would have been back when computers had less RAM (computers did have double digit RAM at some point, right? My history of computer hardware isn't that great)

  11. Re:those young whippersnappers by billcopc · · Score: 4, Funny

    That lib requires cooperative event handling in the kid class. I much prefer the longer, but deterministic form:

    if ( $myLawn->getContents()->filter({type: kid})->count() > 0 ) {
        $myShotgun = new Shotgun()
        $myShotgun->loadAmmo();
        $myLawn->getOwner()->wieldObject($myShotgun);
        for( $i = 5; $i>0; $i--) { sleep(1000); }
        while ( $myLawn->getContents()->filter({type: kid})->count() > 0 ) {
            $myShotgun->fire();
        }
    }

    --
    -Billco, Fnarg.com
  12. Re:those young whippersnappers by maxwell+demon · · Score: 3, Funny

    No, it clearly demands a combination of the observer pattern with the command pattern: You observe your lawn, and if you see kids, you command them to get off it.

    --
    The Tao of math: The numbers you can count are not the real numbers.
  13. Re:Stone Carving Skills by garyebickford · · Score: 2

    Oblig.: A Bunch of Rocks. :D

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  14. Hardware issues less common by coolmadsi · · Score: 2
    I get the feeling that hardware errors were a lot more common back in the authors day; they don't come up very often now.

    One of the first things I learnt when troubleshooting problems is that it is probably a problem with your code, and not the hardware or external software libraries (apart from rare cases).

  15. Excuse me while I laugh my head off... by sconeu · · Score: 3, Insightful

    I'm new to programming myself, but I've always felt the need to learn more about the computer than just the high-level language. That's why I want to take up PERL.

    (emphasis mine)

    This possibly the most hysterically unintentionally funny thing I've read in a long time.

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  16. Embedded software development by DeadCatX2 · · Score: 2

    We still use straight C, sometimes even intermixed with assembly. We know all about resource constraints, given that our microcontrollers sometimes only support a few kB for instructions and data RAM. As far as debugging goes, I'll see your debug-with-printf and I'll raise you a debug-with-oscilloscope-and-GPIO-toggling.

    --
    :(){ :|:& };:
  17. Re:tl;dr by Lennie · · Score: 2

    I prefer "less code"*.

    I find
    - it is usually easier to manage less code
    - has very little depencies
    - is usually easier to debug
    - is usually more efficient

    I have a feeling some people just don't even check anymore what dependencies they suck into it.

    Just recently, I had to look at Microsoft Exchange, a database had a problem. And the commandline tool to fix it didn't work anymore either.

    I took depends.exe and looked at it. The commandline tool to fix the Exchange database files indirectly depends on Internet Explorer. I copied a dll in the directory from an other machine and now the commandline tool works again.

    Some people really are crazy.

    * Not to the extreme ofcourse.

    --
    New things are always on the horizon
  18. Re:This... by JamesP · · Score: 4, Interesting

    the worse code, yes

    But that runs fast on old/not so fast hardware

    Example http://en.wikipedia.org/wiki/Fast_inverse_square_root

    --
    how long until /. fixes commenting on Chrome?
  19. Re:tl;dr by obarel · · Score: 2

    I'm glad you added "not to the extreme". Some people like less code, so they have everything in one big function with variables such as "q" and "mm".

    I prefer more code: many small functions with readable names. Then again, I use auto-completion so I don't get too tired.

  20. Re:Slashdot's Pointless Story of the Day? by FlyingGuy · · Score: 2

    Even modern operating systems are largely written in HLLs

    I guess you consider C a High Level Language. I think a LOT of people would seriously disagree with you.

    I don't care what OS you are using. Those are written in C and Assembler. Look HERE for yourself.

    You are not going to find any php, python, java, perl, ruby etc. etc. there, not a line of it.

    Mostly your comments are pointless. Most really "good" HTML is still written by hand. It may get spewed from some content management system, but who do you think wrote all the HTML and CSS for those? Do you think JOOMLA magically coughed it up?

    You are seriously clue impaired.

    --
    Hey KID! Yeah you, get the fuck off my lawn!
  21. Re:tl;dr by Darinbob · · Score: 2

    But these are still in use. Forget mobile phones, those are massive computers. When you're on a device with a max limit of 1M RAM then you need to worry, or even if one of the processors only has 256 BYTES of RAM, then you seriously need to worry. When the CPU runs at 1MHz or less with one instruction per cycle then you have to worry about what's efficient code and what isn't. This is stuff people have had to worry about this year, not in the 1980s.

    This applies on the high end too. Maybe you've got 4GB of memory but you're using all of it, then you're resource constrained again. Or you have a CPU bound algorithm and efficiency matters again. Or you're doing databases and optimizing the access keeps the web site visitor from waiting needlessly. At some point you just can't be naive and say "we'll just get more memory and next year's cpu".

    A big change I see overall is that in the past the kids who went into computing used to be really interested in how computers work, they didn't shy away from assembler or schematics, the operating system was something that you dove into and tried to understand at the lowest levels, and so forth. Today though the newcomers seem to be interested in doing web stuff and applications and while leaving the computer and OS as black boxes that they don't want to understand.

  22. Where are they finding these "new coders?" by hism · · Score: 2, Interesting

    Every once in a while I read an article on Slashdot about how the current generation of programmers churn out only the shittiest of code; how they have no idea how a computer works; how they could never program without a fully-featured IDE with Intellisense that renders instantly. As an undergrad in a CS/ECE discipline, this has always surprised me-- I can only speak for the curriculum at my school, but I can assure you, these mythical 'lost programming skills' are alive and well. Most of the supposed missing skills are addressed in the following mandatory courses, required for graduation from CS/ECE at my school:

    • - One data structures class and one algorithms class - We learn about properties of fundamental data structures; how to analyze and design algorithms for CS, combinatorial, and graph theory problems; complexity classes
    • - One intro compilers course - Nobody graduates without writing a compiler for a C-like language that outputs MIPS assembly.
    • - One operating systems course - You can either write an OS for a MIPS emulator, or you can write an OS for a physical 68000-based CPU, using C (without the standard library of course) and assembly. So yeah, we have debugged without an IDE, by staring at hex string dumps, for days at a time.
    • - One course on design patterns/architecture - Yes, we learn some Software Engineering principles too, even though it is an academic institution.

    Yeah, sure, the some folks at the bottom of the class may be shitty programmers who scraped by with a "barely passed" in the mandatory courses. But surely they existed 10, 20, 30, 40 years ago as well. I'm not sure where people are getting this idea that new coders have no skills. What do they think we do for four years, set up MySQL and write PHP for it?

  23. Re:tl;dr by Darinbob · · Score: 2

    When the critical mass of programmers just don't worry about efficiency you get this sort of behavior of the type that makes other engineers cringe. Software right now is sort of like the auto industry in the 50's, we're all about adding cool looking tail fins while sticking a cast iron engine block up front.

    I have seen people recite the mantra of "don't optimize prematurely" when I can tell that they think it means to never optimize.

  24. Also in terms of CPU or RAM by Sycraft-fu · · Score: 3, Insightful

    You need to wait until the shit is done, then profile it. You suck at knowing what needs to be optimized, no I don't care how good you think you are. Ask the experts, like Knuth or Abrash.

    So if the speed matters, or the RAM usage, or whatever you write the program, then you profile it, in real usage, and see what happens. You then find where spending your time is worth it.

    For example support you find a single function uses 95% of all the execution time. Well, until you've optimized that, it is stupid to spend time optimizing anything else because even a small gain in that function will outweigh a massive gain elsewhere. You need to find those problems spots, those areas of high usage, and optimize them first, and you can't do that until the program is written and profiled.

    That is also pretty common too, the "Couple areas that use all the resources," thing. It is not usual for it to be spread across all the code. So you need a profiler to identify those and you then need to focus your effort. You can then break out the ASM hackery for those few lines that have to be super fast, if needed, and you'll achieve most if not all of the result you would from doing the whole thing low level.

    1. Re:Also in terms of CPU or RAM by aztracker1 · · Score: 2

      Again, I agree to an extent... However some decisions up front can be just plain bad... for example, querying a database, pulling a fairly complicated set of joins for a result set, then only using 2 fields because the procedure already existed, to augment this information in a loop, where another query is made for each iteration, that now pulls more information across the wire to use three fields instead of a simpler query with a left join.

      I've seen many times over where a convention is used, and a result takes > 3 seconds that should take a fraction of a second. I know that even then it's not so bad, but I am tired of seeing unresponsive web based applications that are only that way because of poor coding choices. Not even getting into passing dates, uuid's, and numbers as strings. It's not rocket science. Simple, poorly written line of business apps. As much as I may prefer one framework over another, the types of bad choices I see happen over, and over again.

      A lot of this doesn't come down to premature optimization, a lot often comes down to using certain design patterns, or conventions where they don't belong. Right now, I'm reviewing an application using a typical entity/dal/bll separation, with stored procedures behind the bll. A lot of whats in place is a literal crap ton of translation layers, often for tabular data that doesn't really even fit the enitities defined well, tis isn't "MS Entity Framework" nut hand code.. The entire BLL goes straght to the DAL, which in turn often calls a sproc... most sprocs are only used one place. A really simple web app that should have taken less than 3 months is now at month 8, and still has a ton of bugs, and unfinished work. A simpler DAL for the db calls from the application without the entities, and/or bll would have been simpler, easier to maintain and taken less time. Many of the SPs are really simple queries that imho didn't need t be broken out like they were (that's a dba v. dev argument though).

      I've seen similar issues in using ORM tools religiously, where breaking out of the ORM is often prudent.

      Total tangent, been a really frustrating day.

      --
      Michael J. Ryan - tracker1.info
  25. Yesterday's coders aren't necessarily relevant by Just+Some+Guy · · Score: 4, Interesting

    Some old-school developers prematurely optimize for things we no longer need to optimize for (and shouldn't). From an older post of mine:

    A recent experience with an ex-coworker illustrated this pretty well for me:

    Said fellow, call him "Joe", had about 30 years of COBOL experience. We're a Python shop but hired him based on his general coding abilities. The problem was that he wrote COBOL in every language he used, and the results were disastrous. He was used to optimizing for tiny RAM machines or tight resource allocations and did things like querying the database with a rather complex join for each record out of quite a few million. I stepped in to look at his code because it took about 4 hours to run and was slamming the database most of the time. I re-wrote part of it with a bit of caching and got the run-time down to 8 seconds. (Choose to believe me or not, but I'd testify to those numbers in court.) I gave it back to him, he made some modifications, and tried it again - 3 hours this time. I asked him what on Earth he'd done to re-break the program, and he'd pretty much stripped out my caching. Why? Because it used almost half a gig of RAM! on his desktop and he thought that was abhorrent.

    Never mind that it was going to be run on a server with 8GB of RAM, and that I'd much rather use .5GB for 8 seconds than 1MB for 3 hours of intense activity.

    So Joe isn't every COBOL programmer, but you and I both know that he's a lot of them. But back to the direct point, how much of that 250GLOC was written with the assumption that it'd be running on 512KB machines or with glacial hard drives or where making the executable as tiny as possible was an extreme priority? Doing things like storing cache data in hash tables would've been obscenely expensive back in the day, so those old algorithms were designed to be hyper-efficient and dog slow. Whether you think that constitutes "working well" is up to you.

    He was optimizing for resources that were no longer constrained, and consequently pessimizing for the resources we actually cared about. RAM? Dirt cheap, at least for the dataset sizes involved in that project. Much more expensive was all the extra disk and CPU load he was creating on the company-wide database server (which is sufficiently powerful to serve the entire company when it's not being deliberately assaulted).

    I'm not "anything goes" by any means, and I'm the guy responsible for making sure that lots of processes can peacefully coexist on an efficiently small number of servers. But for all intents and purposes, most of our apps have unlimited resources available to them. If they want to use 100% of a CPU core for 5 minutes or 2GB of RAM for half an hour a day, so be it. I'd much rather run simple, testable, maintainable code that happens to use a lot of server power than lovingly hand-mangled code that no one but the original programmer can understand and which interacts with the rest of the network in entertainingly unpredictable ways.

    --
    Dewey, what part of this looks like authorities should be involved?
  26. No what we need is programmers that can execute by codepunk · · Score: 2

    Over the last few years the most disturbing trend I have seen is programmers that do not have the ability to ship a product. You can talk all the shit you want about architecture, cute technology, methodology but if you don't ship product you don't count.

    --


    Got Code?
  27. Far TOO true.... by Magnificat · · Score: 2

    My own experience has born out much of what the author states -- yet he really doesn't go far enough. The problem is less with the new coders and more with the system and what University's and Computer Science departments are teaching (or NOT teaching, as the case may be).

    Even since as far back as 25 years ago far too many programs have been aimed at theoretical computing models and don't teach practical design methods -- especially for embedded applications. At the company I used to work for, we specifically would not hire anyone with a Computer Science degree unless they came on board as a contractor for 6 months first (until we could see if they actually had a clue) -- EE's and ECE's we would usually hire outright (though we sometimes regretted it).

    The emphasis on people not understanding hardware interfacing in the article is spot on -- I deal with programmers quite often who have absolutely no clue what happens when the code they have written actually runs and tries to talk to hardware (and they have equally poor understanding of assembly code and how compiler theory applies to the translation between a high level language and what actually gets executed).

    If you are dealing with Windows or OS X apps that have what amounts to unlimited memory space and an insanely fast processor, this is borderline acceptable (though it still yields horrendous code that is often far more bloated and slower than it needs to be.

    To those who say that it is a bad idea for a company to allow their programmers to "waste time" writing good or optimized code, I say, "it all depends on your target market" -- and whether or not you have to support the product into the future.

    I personally have worked on a project where we had 3 high level engineers spend 4 months to re-architect code in such a way as to allow us to eliminate a single IC that cost about $0.25. In essence, we spent a man year of effort to eliminate a part that cost less than a quarter -- and it was an EXCELLENT investment and made perfect financial sense. This IC was on our display processing board and went into basically every item we produced (TV sets), on multiple production lines and across basically every screen size. This same design was used (with slight modification) over almost 6 years. In each average year, over 1.5 *MILLION* of these boards were produced and sold -- which means that eliminating that part saved us around $375,000 *per year* (and probably close to $2.5M over the life of the design).

    Similarly, I actually spent almost 3 months hand optimizing Keil C code (and hand-coding some routines into assembly, as I can generally do a far better job than the compiler) to allow the code to ship in a micro with one size smaller embedded ROM (at a savings of several DOLLARS per part). We shipped our initial production run with the larger part to meet schedule and then shifted over to the smaller one as production continued.

    Other things that current software engineers I run across are completely ignorant of is that there ARE errors in hardware and that there ARE differences between different manufacturers devices -- and they often have to be treated quite differently. I primarily write low level embedded device drivers for a living -- and let me tell you, the number of glitches I see in hardware are legion. So are the differences in parts that are "theoretically" identical from different manufacturers. A good case in point would be when our purchasing department decided to sub a Xicor 24C series I2C EE for an ST 24C I2C EE. They are supposed identical parts, with identical specs, with identical memory capability, etc -- but the Xicor part handled the internal voltage pump differently for consecutive rewrites across blocks of memory cells than the ST part did. The end result was that while the part initially worked, they began failing in the field within a few months -- where some of the original ST parts are still working to this day. There was nothing wrong with the Xicor part, per se, and once we ch

  28. Re:tl;dr by jakartus · · Score: 2

    Funny, the "demo scene" link mentions how the old-timers are frustrated by the newcomers.

    If you want to learn something to an extreme and have it be relevant 20 years later, become a carpenter or a stone mason, stay out of software.

    And to be clear, I am not ripping on carpenters or stone masons, just that if you get into software, understand that 90% of what you know at any point in time is going to be useless 20 years later.

    Take an expert in DOS interrupts, BIOS minutae, 80386 code optimization, utilizing EMS and XMS memory from 1991 and transport him through time to today. He could very well be immediately unemployed for a significant amount of time. And of course, if smart and adaptive that person can learn new things.

    My point is, you can't stick a pole in the ground and say, "this is it, MASM, Visual C++ 1.5 and MFC, thats it! I don't have to learn anything else! Time to start memorizing the instruction set!"

    Now I am not saying not to learn something to an extreme either, just don't expect relevancy 20 years hence.

  29. Re:tl;dr by ultranova · · Score: 3, Interesting

    When the critical mass of programmers just don't worry about efficiency you get this sort of behavior of the type that makes other engineers cringe. Software right now is sort of like the auto industry in the 50's, we're all about adding cool looking tail fins while sticking a cast iron engine block up front.

    No, software right now is turning from a craft into an industry, which means that artisans are being replaced by minimum-wage drones and automated code generators. Of course quality is going to suffer as a result.

    --

    Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  30. Re:tl;dr by Dutch+Gun · · Score: 4, Insightful

    I'd submit the game development industry is still one place where tight, fast-running code really matters. But the trick is, writing efficient code is extremely slow and expensive to develop. At my company, our game engine is written in C/C++ like most places, but we still write most of our tools in C# or Python (and from what I understand, that's also becoming the norm). We well understand that we're trading efficiency of execution for efficiency of performance in those cases. Both types of coding certainly have their place.

    I get a little annoyed at zealots on both sides that claim that "C++ is dead" or "C# is too slow", blah, blah... If you ask a carpenter what is "best tool" is, he might ask you "for doing what?" Programming is no different. People who cling to a single language or paradigm are just missing the big picture, IMO.

    --
    Irony: Agile development has too much intertia to be abandoned now.
  31. Re:tl;dr by mykepredko · · Score: 2

    Your missing the fact that the development machine that was used to develop this code probably had 64k or less of RAM - "pointer_to_the_structure_containing_the_information_about_xy" could result in the code not compiling due to memory constraints on the build machine.

    I agree with what you're saying - a variable named "q" is probably a good example of somebody who's not a good coder and it could have been renamed to something like "ptr_xyInfo" and not blow the build machine.

    myke

  32. Re:tl;dr by jellomizer · · Score: 4, Interesting

    Having developed on old platforms and new ones and back to old one. You actually get much better quality out of the new stuff. We look back at the old software with pride on how well it runs, forgetting the decades of errors and problems it had in the past, and the years of effort it took to get them run at that level.

    The old stuff seems to run faster but not really. Old word perfect, no realtime spell check, no fonts, bold and italics were the big features, along with multi-column and margins. The display was 80x25 and still the app crashed and you lost all your work. And took minutes to load off your floppy.

    Can new developers write tighter code. Sure they are not stupid. But how much can you loose from doing it? Getting in too late in the market? Loss of multi-platform support? Hard to maintain? Vulnerable to hacking?

    I just heard a report that the high frequency trading systems are easy to hack into because they have been developed for all speed... Leaving room for hacking in. As anyone has done coding knows it takes 10% to get the program to do what it needs to do and the rest to make sure humans don't cause it to do something else.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  33. Re:tl;dr by r6144 · · Score: 2

    I think "don't optimize prematurely" implies that the code should have reasonable efficiency in the first place, and "optimization" work that sacrifices clarity for further efficiency should not be done prematurely. Some people write code that is very ugly and slow, and such code needs more optimization that tends to make it even uglier.

  34. Re:tl;dr by BitZtream · · Score: 3, Insightful

    Less code does NOT mean smaller file sizes.

    I write (in general) smaller amounts of code than any of the other 4 developers I have to work with, but I also document my code as I write it, the doxygen info for a function or methods is fully written out before I start writing the function. I document then write. My files are always larger because my documentation and commenting is far more complete.

    Using shorter variable names does not mean you're writing less code, you're just using less text to do the same thing. That also generally means you're writing unreadable code. Disk space and IO for files used in a compile is irrelevant for any reasonably sized project. If your project is so big that the size of your variable names makes a noticeable difference in your build times ... then you need to reorganize your project.

    Good code is self documenting, but being that most of us can't write code that beautiful, proper documentation makes the code suck less for the next guy.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  35. Re:tl;dr by BitZtream · · Score: 4, Insightful

    Your phone has 200MB of memory, so when a stupid app uses all 200MB ... then what? You don't run your other apps? Being wasteful is stupid regardless of where you do it, in your home, or in your code.

    (computers did have double digit RAM at some point, right? My history of computer hardware isn't that great)

    http://www.atmel.com/dyn/products/product_card.asp?part_id=4605&category_id=163&family_id=607&subfamily_id=791

    If you're too lazy to follow the link:

    The high-performance, low-power Atmel 8-bit AVR RISC-based microcontroller combines 512B ISP flash memory, 32B SRAM

    That '32B SRAM' is actually shared with the 16 general purpose registers, so if you take those out, you have 16 bytes of ram. With those 16 bytes and the rest of the IO and other functions built in you can easily control 3 servos from a single input line, which takes feed from a larger motor. That chip is capable of driving stepper motors with interpolation for a CNC machine, again taking position information from somewhere else, not processing the command tree itself. The chip is used to handle input from several glass breakage detectors and performing false positive checks to avoid triggering because the cat knocked something off that didn't actually break an external window.

    In short, the modern world is built on devices with tiny ass amounts of ram. Do you wear a digital watch? They're getting rarer now days, but thats another example.

    Its not history were that stuff mattered, its right now today, you just aren't aware of it. Nothing about the concepts used then is bad today, they STILL provide massive benefits if you know them and follow them. You're basically saying 'gasoline is cheap, just burn more to get more done' and ignoring the fact that there are clear physical limits to computing, a given amount of mass, regardless of how its configured, can only store so much data and performing so many computations. Eventually you'll have devices which simply can't meet the demand being put on them ... because people thought ram/processing power was cheap and we no longer need to worry about those old guys.

    Locality of reference, cache hits, pipeline stalls ... all these things that you know nothing about, yet drastically affect how your shitty little app runs. Sigh, I swear at some point in the past people actually took pride in 'doing it right'.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  36. Re:tl;dr by BrokenHalo · · Score: 2

    If you ask a carpenter what is "best tool" is, he might ask you "for doing what?"

    Most likely, he'll say "my brain".

  37. Economy/elegance is a green issue too by hughbar · · Score: 2

    First to declare interest, I'm 60 pre-internet and generation COBOL/Assembler, get off my lawn generation too!

    That said, there's a great many good reasons for doing things economically, concisely and elegantly, Occam's razor, optimal use of resources [a financial matter too], no constant upgrades and server/desktop refreshes. No endless addition of extra storage because stuff is duplicated everywhere. By the way, if someone starts a project to de-duplicate the web down to a 'safe' evel [only ten copies of each thing not 2K] , I'll sign up.

    I also resent, mainly government who send me half a dozen self-congratulatory jpegs with each email. You're wasting bandwidth and blocking up the pipes, you folks.

    So, if we pay a little attention, we won't need the sprawling power-hungry data centres that all the big players seem to be building. WE won;t need the constant hardware refreshes [admittedly a lot of those are Windows 'upgrades'].

    Anyways, don't listen to me, I'm old and grumpy, but take a look at this: http://en.wikipedia.org/wiki/Green_computing especially Product Longevity.

    --
    On y va, qui mal y pense!
  38. When optimization is premature by DragonWriter · · Score: 2

    I have seen people recite the mantra of "don't optimize prematurely" when I can tell that they think it means to never optimize.

    That's often what it means, and not by accident. "Don't optimize prematurely" means don't optimize until there is evidence that you need to optimize, and then only optimize what there is evidence that you need to optimize. In practice, that means (for many components) never optimizing many aspects that could, in theory, be optimized, because optimization never turns out to be the change that offers the most value for the effort.

    Don't optimize prematurely ultimately is just a special case of "do the one thing that delivers the most value for the effort, and repeat as needed". Until optimization od the code for any particular characteristic (whether its speed, memory consumption, or something else) is that one thing, doing it is a waste of resources.

  39. Re:tl;dr by onepoint · · Score: 2

    The ability to consistently code cleanly with small functions is great, You basically build application based on well proven code, over time you most likely have blended functions together and optimized them. What you are doing is what we did back in the day's with index card's and floppies, you had a stack of code that you used over and over again, made smaller and better. it's the quality of your functional libraries that make you a success in the industry and keeps you employed.

     

    --
    if you see me, smile and say hello.
  40. Re:Cheap microcontrollers by n7ytd · · Score: 2

    Yes, there really are micros much smaller and cheaper than that. $2 in production quantities can get you 128k of Flash and 16k of SRAM on something with a CPU decent enough to run sloppy C code. You're thinking much too large; think $0.30-$0.40 for the cheapies. Google around for the Atmel Tiny4, Tiny12, or the Microchip 10F family for starters...

    You are correct about the quantities of scale, but remember that if that electric toothbrush is $40 at retail, the company probably didn't spend more than $8-$10 in materials to build it. At those prices, $0.50 makes a big difference when you are shipping 100K or 1M each month.