Slashdot Mirror


What Are the Genuinely Useful Ideas In Programming?

Hugh Pickens DOT Com writes "Computer Scientist Daniel Lemire has had an interesting discussion going on at his site about the ideas in software that are universally recognized as useful. 'Let me put it this way: if you were to meet a master of software programming, what are you absolutely sure he will recommend to a kid who wants to become a programmer?' Lemire's list currently includes structured programming; Unix and its corresponding philosophy; database transactions; the 'relational database;' the graphical user interface; software testing; the most basic data structures (the heap, the hash table, and trees) and a handful of basic algorithms such as quicksort; public-key encryption and cryptographic hashing; high-level programming and typing; and version control. 'Maybe you feel that functional and object-oriented programming are essential. Maybe you think that I should include complexity analysis, JavaScript, XML, or garbage collection. One can have endless debates but I am trying to narrow it down to an uncontroversial list.' Inspired by Lemire, Philip Reames has come up with his own list of 'Things every practicing software engineer should aim to know.'"

87 of 598 comments (clear)

  1. I can think of one that Steve Jobs disagreed with by Cryacin · · Score: 4, Funny

    The "on" button.

    --
    Science advances one funeral at a time- Max Planck
  2. It's not just about the concepts by Krishnoid · · Score: 4, Informative

    if you were to meet a master of software programming, what are you absolutely sure he will recommend to a kid who wants to become a programmer?

    Make it clear that 'mastery' of programming involves wisdom and experience beyond knowledge of techniques. My go-to example for this is Code Complete.

    1. Re:It's not just about the concepts by Anonymous Coward · · Score: 4, Insightful

      Practice makes perfect.

      It always amazes me how I can go back to a language I knew so well 5 years ago, yet I make mistakes you'd see from a first year CS student.

      Nah, practice makes better... nobody's perfect.

  3. Regular Expressions by Kohath · · Score: 5, Informative

    are the most useful thing I learned in the last 5 years.

    1. Re:Regular Expressions by jlar · · Score: 5, Funny

      "Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems."

      - Jamie Zawinski

    2. Re:Regular Expressions by H0p313ss · · Score: 3, Insightful

      are the most useful thing I learned in the last 5 years.

      Regular expressions are incredibly powerful and useful, if you know how to use them and how to not abuse them.

      Much like welding torches.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    3. Re:Regular Expressions by cold+fjord · · Score: 4, Informative

      And then they code those regular expressions in Perl. Now they have three problems.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    4. Re:Regular Expressions by cold+fjord · · Score: 4, Informative

      That makes them a good companion to Unix, which has the nature of a chainsaw. In skilled hands it makes short work of difficult problems. But if your attention wanders, your leg is gone without warning.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    5. Re:Regular Expressions by pjt33 · · Score: 2

      When did this discussion become about getting kids interested in programming? The overall context seems to be about things which professional programmers would do well to know.

    6. Re:Regular Expressions by knarf · · Score: 2

      Did you maybe mean to say 'And then they code those regular expressions in Perl. Now I have a problem'? I have no problems with Perl, especially when it concerns regular expressions. There is a reason why libpcre is as popular as it is after all...

      --
      --frank[at]unternet.org
    7. Re:Regular Expressions by knarf · · Score: 2

      Good for you, Perl fits that kind of job just fine.

      Look a bit deeper and you'll notice that most of the knocking is done by those who never wrote anything more complicated than a few lines of Perl. Their lack of experience with the language, combined with their need to feel 'ahead of the pack' leads them to dismiss it in favour of whatever is fashionable at the moment. This says more about the knockers than the knocked.

      --
      --frank[at]unternet.org
  4. lowest common denominator by Laxori666 · · Score: 3, Insightful

    By definition, most programmers are not masters of software programming. So why is Daniel trying to compile a list that everybody will agree with? That would be a list of what every non-master programmer agrees a master programmer should know, which is different than a list of what a programmer should know to be a master programmer...

    As for my approach, it would be to list those qualities which would make learning Javascript, XML, relational databases, etc., easy enough to do, by which I mean, those qualities which would allow a programmer to be able to self-teach himself these things, to the master level if his tasks require it. A master programmer doesn't have to know Objective-C or JavaScript, but he sure as heck better be able to learn how to effectively use them if he needs to.

  5. Can't Trick Me! by Erik_Kahl · · Score: 4, Funny

    I'm not writing your "How to be a Programmer in 20 Minutes!" ebook for you. You'll have to spend 20 years learning like the rest of us.

    1. Re:Can't Trick Me! by umghhh · · Score: 2

      except that some did that and are nowhere near. Come to think of it I know few experienced master coderz that still have not noticed the forest behind the trees they fell. They are skilled at coding only take two of them and their code will collide and you need an apprentice to clean up.

  6. After 30 years of programming by jgotts · · Score: 5, Insightful

    Forget about having to learn any specific language or environment. You should be able to pick up any language or environment on the job.

    You need to learn how to plan, estimate how long that plan will take to complete, and finish it on time. Very few programmers I've worked with are any good at estimating how much time they will take to complete anything. The worst offenders take double the amount of time they say they will.

    Forget about specific computer science trivia. You can look that all up, and it's all available in libraries with various licenses. When you're starting a new job, refresh yourself on how that problem is already being solved. If you need a refresher on a specific computer science concept, take some time and do so.

    With this advice you won't burn out at age 25.

    1. Re:After 30 years of programming by pezpunk · · Score: 5, Funny

      the WORST offenders take twice as long as their estimate? you know some pretty good programmers!

      --
      i could live a little longer in this prison
    2. Re:After 30 years of programming by tlhIngan · · Score: 4, Insightful

      Forget about specific computer science trivia. You can look that all up, and it's all available in libraries with various licenses. When you're starting a new job, refresh yourself on how that problem is already being solved. If you need a refresher on a specific computer science concept, take some time and do so.

      Well, it's helpful to have the basic understanding of Big-O and what common algorithms have. It's also worthwhile to know when it really doesn't matter - using bubblesort is bad, but if you know you're only sorting 10 items ever, it'll work in a pinch.

      Knowing this can have an effect on what algorithms you choose and even how you architect the system - perhaps what you're dealing with may end up causing quicksort to see its worst-case behavior far more often than necessary.

      And you laugh, but I've seen commercial software falter because of poor choices of algorithms - where doing a 1 second capture is perfectly fine, but a 10 second capture causes it to bog down and be 100 times slower.

      Or the time where adding a line to a text box causes it to get exponentially slower because adding a line causes a memory allocation and a memory copy.

      Next, understand OS fundamentals and how the computer really works. Things like how virtual memory and page files operate, how the heap works and synchronization and even lock-free algorithms and memory barriers. It's difficult to learn on your own - it takes a lot of time to sit down and really understand how it works and why it works, and even then it can take 3-4 different methods of explanation until it clicks.

      Concurrent programming isn't hard especially if concurrency was taken into account when the system was designed. Adding concurrency to a non-concurrent system though is a huge, difficult and trouble-prone process. Especially once bit-rot has set in and you find 10 different ways of getting at the variable.

    3. Re:After 30 years of programming by Anrego · · Score: 2

      Yup!

      Estimation is a dark art, and most people suck at it.

      My best approach has always been to break a problem down into chunks, then break those chunks into smaller chunks, until I'm left with something granular enough to actually base an estimate on.

      I'd expand on this by adding that not only is estimation an important skill, but self management is equally important. Is that chunk you thought would take a week now in it's third week? How is that going to affect the schedule (hint: I'll just do the next chunk faster is not a good path to go down..)? Recognizing how you are performing and identifying when you are about to blow the schedule while it can still be mitigated vice being just as surprised as your boss when it's way to late is a really good thing.

    4. Re:After 30 years of programming by bzipitidoo · · Score: 3, Insightful

      Estimates? How long does it take to solve a maze? Take all the correct turns, and you'll be done in a few minutes. One wrong turn, and it could take hours. How do you estimate that?

      A big reason why estimates tend to be low is the tendency to overlook all the little problems that shouldn't happen but do. It's not just that libraries have bugs too. Systems sometimes go down. Networks can corrupt data. I could never get any programming or system administration work done quickly, because I'd always run into 3 or 4 other things that I had to fix or work around first. A hard drive crash is when you find out that the DVD drive which was fine for light usage overheats during an install, that the updated OS breaks part of the software, and that it was only inertia keeping the server on the misconfigured network and once it was powered down another server grabs its IP address, and so on. Once had to work around the libpng site being blocked for "inappropriate content" by the latest update of the company's web monitoring software. But those are relatively trivial problems that don't blow estimates by orders of magnitude.

      Your advice is fine for hacks who need to grind out simple business logic, or glue a few well tested and thoroughly traveled library functions together, and who don't have to think much about performance or memory constraints. There's very little uncertainty in that kind of work. But when you're trying to do new things, trying out new algorithms, and you have no idea whether they will even work, let alone be fast enough, you're back in the maze. We could have got astronauts to the moon 5 years sooner if we knew beforehand which directions were blind alleys.

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    5. Re:After 30 years of programming by mcvos · · Score: 2

      That's exactly how I work. I've learned at least one new language right at the start of every new job, and even for languages I've got years of experience in, I still look stuff up. Thanks to Google, looking up language or framework specific stuff takes almost no time.

      Learning how to plan is where I currently am. Pulling a number out of thin air clearly doesn't work. You need to cut the task up into smaller tasks, and those into smaller tasks still, and then describe the smallest, most trivial tasks in sufficient detail that anyone understands what it means. Once you've done that, you understand your problem well enough to estimate all the parts, add them up, and then multiply by 2 because you've certainly overlooked something important.

      Also important is to recognize when your code starts to smell. You can't accurately plan the architecture of any complex project up front. You need something "good enough" to start with, but you'll eventually run into a situation where your original design doesn't work anymore. Learn to recognize that moment, and refactor before the mess gets too impenetrable. But you do need a bit of mess before you refactor, otherwise you don't know what you're refactoring for. Also, cleaning up a mess makes you feel good.

  7. XML? Really? by Anonymous Coward · · Score: 2, Insightful

    What is this, the 90s? In a world with JSON and YAML, why should we bother learning XML for anything other than legacy systems?

    1. Re:XML? Really? by K.+S.+Kyosuke · · Score: 2

      Who uses JSON and YAML outside web development?

      Actually, web development is the only place where you *have* to use a non-zero amount of XML since the web technologies are kind of *based* on SGML/XML. OUTSIDE of web development, there are precisely zero reasons to use XML at all. The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.

      Give me S-expressions or another suitable well-established self-describing format any day of the week.

      --
      Ezekiel 23:20
  8. Don't ask me how I know this by Crash+McBang · · Score: 3, Insightful

    People don't know what they want till they see it. Prototype early, prototype often.

    --
    To put a witty saying into 120 characters, jst rmv ll th vwls.
    1. Re:Don't ask me how I know this by Anrego · · Score: 5, Insightful

      But never make the prototype too good.

      "You need 12 weeks to turn it into actual software? this works fine!"

  9. the most basic data structures by TopSpin · · Score: 4, Insightful

    the heap, the hash table, and trees

    There is nothing basic about these. Each is the subject of on-going research and implementations range from simplistic and poor to fabulously sophisticated.

    An important basic data structure? Try a stack.

    Yes, a stack. What majority of supposed graduates of whatever programming related education you care to cite are basically ignorant of the importance and qualities of a stack? Some of the simplest processors implement exactly one data structure; a stack, from which all other abstractions must be derived. A stack is what you resort to when you can't piss away cycles and space on ....better.... data structures. Yet that feature prevades essentially all ISAs from the 4004 to every one of our contemporary billion transistor CPUs.

    --
    Lurking at the bottom of the gravity well, getting old
  10. FUDD'S FIRST LAW OF OPPOSITION by Jeremiah+Cornelius · · Score: 2

    "If you push something hard enough, it will fall over"

    I think also,

    "It goes in, it must come out"
    -- Testlcle's deviant to Fudd's law.

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
  11. The Closure by gillbates · · Score: 5, Insightful

    The most useful concept I've ever come across is the notion of a closure in Lisp. The entire operating state of a function is contained within that function. This, and the McCarthy lisp paper (1955!) where it is explained how a lisp interpreter could be created using only a handful of assembly instructions is well worth the read. It is from the fundamental concepts first pioneered in lisp that all object oriented programming paradigms spring; if you can understand and appreciate lisp, the notions of encapsulation, data hiding, abstraction, and privacy will become second nature to you.

    Furthermore, if you actually put forth the time to learn lisp, two things will become immediately apparent:

    1. A language's usefulness is more a matter of the abstractions it supports than the particular libraries available, and
    2. Great ideas are much more powerful than the language used to express them.

    In Stroustroup's "The C++ programming language", there are numerous examples of concise, elegant code. These spring from the concept of deferring the details until they can be deferred no more - the top-down approach results in code which is easily understood, elegant, efficient, robust, and maintainable.

    Many years ago, a poster commented that the work necessary to complete a particular project was the equivalent of writing a compiler; he was trying to emphasize just how broken and unmaintainable the code was. The irony in his statement is that most professional projects are far more complex than a compiler needs to be; because he didn't understand how they worked, he thought of them as necessarily complex. However, the operation of a compiler is actually quite simple to someone who understands how they work; the McCarthy paper shows how high level code constructs can be easily broken down into lower-level machine language instructions, and Knuth implements a MIX interpreter in a few pages in the "The Art of Computer Programming." Neither building a compiler nor an interpreter are monumental undertakings if you understand the principles of parsing and code structure. i.e., what does it mean if something is an operator, versus, say, an identifier.

    Ideas are powerful; the details, temporarily useful. Learn the ideas.

    --
    The society for a thought-free internet welcomes you.
    1. Re:The Closure by cold+fjord · · Score: 4, Funny

      Furthermore, if you actually put forth the time to learn lisp, two things will become immediately apparent:

      That you know both Forth and Lisp?

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
  12. Code Comments by gimmeataco · · Score: 4, Insightful

    What about code comments? I hated doing it for starters, but when you're working with something big or revisiting code after long period of period, it's invaluable.

  13. KISS principle by Anonymous Coward · · Score: 2, Insightful

    As simple as possible to accomplish the task correctly, and no simpler. That and find a career that hasn't been decimated in the last 5 years.

    Wait that is what I would tell a kid. An expert would probably preach the methodology he has the most vested interest in.

  14. Great read: The Pragmatic Programmer by gentryx · · Score: 3, Interesting

    Exactly. Code Complete is a great book. I liked The Pragmatic Programmer -- from Journeyman to Master even better. It's slightly more meta, but the tips inside are really universa.

    Some are even applicable beyond software engineering, e.g. "don't repeat yourself" (i.e. don't have two versions of the same information (e.g. your source in your repository and its documentation on your website) stored in two different places because the probability that over the time both will diverge equals 1. It's better to make one the master copy and derive the other from it.) I recommend this book to all my students.

    --
    Computer simulation made easy -- LibGeoDecomp
  15. Input validation by KevMar · · Score: 5, Insightful

    I think he was missing input validation from his list. The idea that you can never trust user input and you must validate it. The idea that you should white list what you want instead of black list the things you don't want. Ideas that consider the security of the system and not just the working condition of it.

    --
    Im a gamer, not a grammer major. This post is full of spelling and grammer mistakes.
  16. Re:I can think of one that Steve Jobs disagreed wi by Z00L00K · · Score: 5, Insightful

    I would say that one of the most important thing in programming is to break down a problem into parts that are useful and easy to manage. It doesn't matter which language you code in. It's very much like building with Lego - you have more use for all those 4x2 bricks than any other brick. The humongous large bricks are "use once". A right sized brick can be copied and pasted into future code as well, possibly tweaked a bit to suit the new environment. In the process of breaking down a problem - define interfaces. Make a design of the important interfaces to make sure that they can remain stable over time. That can make maintenance easier.

    The second most important thing is to learn what compiler warnings means and how to fix them. In this case strong typing isn't your enemy - it's your friend since it will tell you about problems even before you get them when executing the code.

    Third is to learn about which known algorithms that are out in the wild so you don't have to invent them yourself. Quicksort is already implemented a thousand times, so there's no need to implement it again, just find which library you need. If you are developing a commercial app you shall start with the Apache project since that license is permissive when it comes to how the libraries may be incorporated. The LGPL is also good. But leave the license headaches to someone else to sort out if you aren't sure.

    These are the useful ideas I try to follow, the rest is just a mixture of ingredients and seasoning to get something running.

    Remember: You can build a great machine with simple stuff or a stupid machine with expensive stuff.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  17. Re:Continuous Integration by Anrego · · Score: 2

    I'm all for CI (hudson/jenkins being my prefered tool of choice), but no feature branches? Lunacy!

    I strongly believe integration has to be balanced. Sometimes people have to be able to run on their own for a bit then merge their work back in. Every commit going straight into trunk and expected to work is going to add lots of overhead and kill momentum.

  18. Actors and State by KagatoLNX · · Score: 2

    Most programming confusion I've had to combat in the workplace comes from a fundamental misunderstanding of the two most basic facts of your program:

    1. Where is your program's state stored? (NOTE: 90% of the time it's "the call stack" and 90% of the time that's the wrong place to put it.)
    2. Where in your code is execution happening?

    Threaded program generating weirdness? It's probably because you can't answer those two questions. Distributed program a mess to debug? I bet your state is smeared all over the place. Is your code a pain to port to an evented architecture? Bet you modeled your state badly. Can't map some failure to a certain, detectable set of circumstances? I guarantee your answer starts there.

    For me, the answer to understanding these problems was found in functional programming. The no-side-effects stuff causes you to make all of your state concrete and also deeply understand what the call-stack does for you (or, more often than not, *to* you). The cruel reality, though, is that applying this hard-won knowledge *doesn't* seem lie in functional programming (or, at least, not LISP, Schema, Haskell, and crew).

    If you're an academic, start with Hoare's Communicating Sequential Processes (http://www.usingcsp.com/cspbook.pdf), then learn Erlang (or Go, with a heavy emphasis on GoRoutines). If you're less Ivory Tower, try to grok this blog entry (http://blog.incubaid.com/2012/03/28/the-game-of-distributed-systems-programming-which-level-are-you/), then learn Erlang (or Go, with a heavy emphasis on GoRoutines).

    --
    I think Mauve has the most RAM. --PHB (Dilbert Comic)
    1. Re:Actors and State by jasno · · Score: 3, Insightful

      Dammit I wasted a mod point but I gotta add to this...

      Understand state. Understand state machines. Understand that many times the best solution is to define and implement a state machine. It won't make you feel warm and fuzzy from all the neato tricks you invented. It will often result in a system that is easily understood, analyzed and extended without causing too many problems.

      I know, that's not exactly what you were talking about but your use of the word 'state' got me thinking.

      One more thing - software engineering... programming... whatever. It's a big field. There are folks who make more than me and all they do is glue together java libraries or craft SQL statements. I personally work in the lower levels. The things I need to know are worlds apart from other programmers. I better damn well know how to implement circular buffers, properly lock shared state, understand common hardware interface quirks, memory management, etc. etc.... It would be silly for some folks to waste their time learning those things. Would it make them a better programmer? Probably. But would it ever matter when all they're doing is gluing together libraries? Maybe not.

      I've been in the game for 16 years now. I've never once written or even directly used a sorting algorithm. The first few years I didn't even deal with strings - nothing I programmed used ASCII input or output. No serial ports even. I went the first 10 years not even really understanding what was so special about databases. I learned it on the side for shits and giggles, but it's never been necessary for me to earn a paycheck.

      The only skill every programmer really needs to know is how to be patient and detail oriented. That's the only thing I can think of that truely is common across the discipline.

      --

      http://www.masturbateforpeace.com/
  19. The first law of code: make sure it works by mveloso · · Score: 2

    EOM

  20. Re: Database Transactions by EdmundSS · · Score: 2

    ... are too specific. The concept of an Atomic Operation is important; database transactions are just a domain-specific example.

  21. Re:databases by reluctantjoiner · · Score: 5, Interesting

    Surely any programmer ought to know the underlying principles that make databases work (ie ACID etc) even if they never intend to go anywhere near multi threading. Even in single threaded programs knowing what and how ACID works can help. Have you never done a write() and wondered where the data you sent to disk went?

    Perhaps the relational calculus might not be strictly necessary, however if knowing the theory behind relations helps engineers from naively treating databases as data garbage dumps, it'd be worth it.

  22. Left-corner design by steveha · · Score: 4, Insightful

    The most important book I read as a beginning software developer was Software Tools in Pascal. That book teaches a technique it calls "left-corner design". It's kind of a rule-of-thumb for how to do agile development informally.

    The basic idea: pick some part of the task that is both basic and essential, and implement that. Get it working, and test it to make sure it works. Now, pick another part of the task, and implement as above; continue iterating until you either have met all the specs or are out of time.

    If you meet all the specs, great! If you are out of time, you at least have something working. The book says something like "80% of the problem solved now is usually better than 100% of the problem solved later."

    For example, if you are tasked with writing a sorting program, first make it sort using some sort of sane default (such as simply sorting by code points). Next add options (for example, being able to specify a locale sort order, case-insensitive sorting, removing duplicate lines, pulling from multiple input files, etc.). A really full-featured sorting program will have lots of options, but even a trivial one that just sorts a single way is better than nothing.

    Also, the book recommends releasing early and often. If you have "customers" you let them look at it as early as possible; their feedback may warn you that your design has fatal flaws, or they may suggest features that nobody had thought of when imagining how the software should work. I have experienced this, and it's really cool when you get into a feedback loop with your customer(s), and the software just gets better and better.

    Way back in high school, I tried to write a program to solve a physics problem. I hadn't heard of "left-corner design" and I didn't independently invent it. I spent a lot of time working on unessential features, and when I ran out of time I didn't have a program that did really anything useful.

    This is the one thing I would most wish to tell a new software developer. Left-corner design.

    P.S. Software Tools in Pascal is a rewrite of an older book, Software Tools, where the programs were written in a language called RATFOR. Later I found a copy of Software Tools and found it interesting what things were easier to write in Pascal vs. what things were easier in RATFOR... and when I thought about it I realized that everything was just easier in C. C really is the king of the "Third-Generation" languages.

    --
    lf(1): it's like ls(1) but sorts filenames by extension, tersely
    1. Re:Left-corner design by davide+marney · · Score: 2

      Great advice. In picking what is both "basic and essential" I simply look at dependencies, using two perspectives: first, gating dependency -- what, if it doesn't work, would prevent other things from working -- then, structural dependency -- what is the thing that other things are built on.

      First satisfy yourself that there are several approaches to meeting the gating dependencies, this will actually give you the best all-around sense of what the design of your application will likely become. Then, start from the bottom of the structural dependencies and work you way up. Happily, in most languages you'll find that library support is strongest at the bottom, so your useful level of work will proceed very quickly, and you will be satisfying all the gating dependencies early in the process.

      Done like this, it gets increasingly easier to call in extra hands to help with the work, because what remains is more obvious/common.

      --
      "We receive as friendly that which agrees with, we resist with dislike that which opposes us" - Faraday
    2. Re:Left-corner design by steveha · · Score: 2

      Right, agreed. What you are describing reminds me of the approach recommended in some FORTH books, which they called "bottom-up design". You keep making building blocks and snapping them together into more-powerful building blocks, and iterate until you have completely built everything you need.

      Design simple parts that work together well... keep in mind Gall's Law: "A complex system that works is invariably found to have evolved from a simple system that worked."

      http://en.wikipedia.org/wiki/Gall's_law

      And if you do have a bunch of simple parts that work well together, your design is likely to work well and be easy to expand.

      In college I took one course where the instructor made us draw diagrams with bubbles and arrows before we wrote any actual code. Out in the real world of professional software development, I haven't yet worked at a place that did that, but left-corner design of simple systems has served me very well.

      --
      lf(1): it's like ls(1) but sorts filenames by extension, tersely
  23. Re:Stuff you should learn by Anrego · · Score: 3, Insightful

    I don't know if that's really good advice anymore.

    I mean if it's an interest, sure. Personally I love that stuff.. but unless you plan on doing low level coding for a career, modern programming is so abstract from machine language that knowing what's going on down there is in most cases interesting trivia at best.

  24. Regular Expressions by tbg58 · · Score: 2

    Learn to manipulate text and you can do just about anything.

  25. Re:databases by dgatwood · · Score: 5, Insightful

    Well he's already failed. Databases are a niche topic that doesn't belong in an "uncontroversial" list of things that every software engineer needs to know.

    When it was part of our CS required curriculum, I suspected I would never use it, but it turns out that the vast majority of projects I've been involved with have used databases in some way, and one of them even involved some pretty serious database query optimization. As far as I can tell, unless you pretty much code exclusively down at the kernel level, you're going to eventually be asked to work on some project involving databases. They're the glue that holds technology together. Outside of a handful of niche fields, I'd be surprised if any programmer managed to go more than five years out of school without having to work with one.

    Also, once you understand databases conceptually, everything starts to look like a special case of a database. This is a good thing. C data structures? Table records. Pointers? Relations. And so on. It ends up helping you understand complex problems even if you're one of those rare people who never ends up touching an actual database.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  26. Recommendations for a kid? by Rinikusu · · Score: 4, Insightful

    1) Learn how to have fun. Even when you're mired knee-deep in a gigantic pile of horseshit that is a 10-15 year old VBA/Access/Excel monstrosity written by a half dozen people and commented occasionally in non-english languages, if you can't find a way to enjoy the challenge, your career will be short-lived and miserable.

    2) Work on things that interest you. When you invariably get the point to where you think "I wonder if there's an easier way to do this", google it. Chances are, you're right. With any luck, you can avoid #1 above if you really work at it. I don't think anyone ever woke up in the morning thinking "Fuck this fun shit, I want to be a Programmer III at some .gov contractor", but you never know. I happen to like maintaining and bug-fixing code more than I do architecting full solutions, but I'll accept that I'm an odd bug.

    I mean, I'm reading some of these comments and thinking "yeah, if you pushed Knuth or SICP on me when I was 10, you'd have killed any interest I had in computers." Instead, I was POKEing away on my C64, etc. If anything, figuring out how to solve logic puzzles, breaking down problems, etc, were much more fun for me in the 5th and 6th grade than reading some of the current compsci literature that I *still* require significant motivation to go through. I'm not saying it's not important, I'm just saying that a middle schooler (a kid) may not be all that willing to put in that kind of work, and waiting until college wouldn't be so bad. You know, going back to the comment thing.. a lot of these comments sound like the anti-jock jocks. I remember these kids who's parents were forcing them to play sports and everything revolved around these kids playing sports, but the kids themselves weren't having any fun at all. Now we have nerds acting like jock parents, treating their kids in the same manner.. It can't be healthy.

    --
    If you were me, you'd be good lookin'. - six string samurai
  27. The nature of reality. by VortexCortex · · Score: 2

    Cybernetics. Information Theory. Done. Everything else in the Universe can be mastered & described with these, even physics and quantum physics.

    I taught my 12 year old cousin how to build an adder circuit using a neural net visualization simulation. Then we built it IRL with contractors, then transistors, then we cheated and used some pre-made ICs. He "invented" the Von Neumann architecture by him self -- Well, I should say it was self evident given the core concepts of cybernetics and information theory. He was excited as ever to learn assembly languages and higher level languages, marveling at the heights everyone has gotten to from those core principals. There is no system or language he can not now understand. Even encryption systems he can grok using Information Theory / Entropy.

    I really couldn't imagine introducing anyone to even higher mathematics without giving them the tools to apply and visualize it first... I mean, Turing gave us a universal calculator and we still teach times tables first?

  28. Keep narrowing - a LOT by SuperKendall · · Score: 4, Interesting

    Half of those things are NOT things I would "recommend to a kid who wants to become a programmer".

    Version control, UNIX philosophy, software testing - it's too much! Someone who wants to be a programmer should start to learn programming first, and then they can explore the wild twists and ideas that surround the thing once they have a grasp of what programing means to them.

    I would say even starting languages to recommend depend on the person. If a programmer likes some languages and not others later in life, why should that not be true from day one because of how they like to think? What if you are recommending a language that will turn them off programming forever?

    It would almost be best to develop a kind of programming sandbox, that would let them use a variety of languages and concepts (like functional or OO or even, yes, procedural!) and see the path they take most naturally.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Keep narrowing - a LOT by narcc · · Score: 3, Interesting

      I was with you until the last paragraph.

      How about we point beginners to a simple imperative language with an interactive mode? Pack it with simple but interesting games they can understand and modify.

      You know, the same stuff we had when we were kids. It sure beats the shit we're giving them now.

  29. Fun & Logic & Games by VernonNemitz · · Score: 2

    My introduction to programming went something like this: I started with a small home computer, pre-IBM-PC. It came with Interpreted BASIC. Lucky me, Consumer Reports recommended that particular computer above the others for 2 years, because the manual, teaching BASIC, was very engaging. But let's back up a bit. A few years before computers started getting into homes, a Logic Game hit the market ("Master Mind") and received a Game Of The Year award. That game made it fun to practice Logic. Computer programming relies a great deal on thinking logically, so practicing Logic is very important --but having fun practicing Logic is better still. Later, I jumped from BASIC into Assembly Language Programming --and once again I was lucky. Not only was the processor of that home computer designed to to make programming it easy, the Book I got on how to do that was among the best in the field. So, what sorts of programs did I write? Games, of course! They can incorporate all the important features of any other application; User Interface, Visual (and sometimes also Audio) Outputs, Data Storage/Retrieval, Occasional Oddball Hardware Manipulation, Algorithms. And, of course, the more-developed a game-under-construction became, the more fun it was to test/play. We All Learn Best By Doing. Later, when I began doing professional work, and it wasn't always fun, I could still "hold my own" because the foundations of that career had been solidly emplaced.

  30. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 3, Insightful

    "Quicksort is already implemented a thousand times, so there's no need to implement it again, just find which library you need."

    Yes, that's true, but we're talking about education here, not building websites.

    If you're a coder, and you don't know how to BUILD a hash table from genuinely fundamental, low-level components, or if you can't do a quicksort from those same fundamental building blocks, guess what? I won't hire you.

    It's great to be able to buy or borrow a used V8, but if you don't know how to build one, you're not going to be my mechanic.

  31. Design/architecture by Todd+Knarr · · Score: 2

    The single most important thing isn't about software engineering specifically, it's the ability to analyze a problem, break it down into it's component parts and work out a structure for your solution that solves the problem well. Just like the most important part of building a house isn't anything to do with actually building it, it's deciding what kind of house you're going to build, what rooms it's going to need and how they're going to be arranged. You need a very different house if you want it to support a family with 2 or 3 kids vs. just a single person or a couple without children. If you don't get that right, all the technical chops in the world later on won't help your having been hamstrung by a bad overall design. Lack of that ability has been the root cause behind something like 75% of the "software engineering" failures I've had to deal with.

  32. Re:You mean basic stuff? by dgatwood · · Score: 5, Insightful

    IMO, a function should be as long as it needs to be, and no shorter or longer. If the most easily understood way to express a concept is as a 5,000 line function, then you should write a 5,000 line function. Splitting up a function based on some arbitrary length limitation can only lead to less readable code.

    For example, my record is almost 5,500 lines. The entire function is basically a giant switch statement in a parser (post-tokenization). The only way you could make that function significantly shorter would be to shove each case into a function, and all that would do is make it harder to follow the program flow through the function for no good reason. At any given moment, you're still going to be staring at exactly one of those cases per token (plus a little code on either end), so having each case in a separate function just adds execution overhead without improving readability, and it makes debugging harder because you now have to pass piles of flags around everywhere instead of just using a local variable.

    One of the data structures for the function in question is almost 1200 lines long by itself (including anywhere from two to fifteen lines of explanation per field, because I wanted to make sure this code is actually maintainable). By itself, the initializer for that data structure cannot meet your "fits on one screen" rule, even with most of the fields auto-initialized to empty. And there's no good way to shrink that data structure. It is a state object for a very complex state machine. The code to interpret the end state is over a thousand lines of code by itself.

    In short, those sorts of rules simply don't make sense once the problem you're trying to solve becomes sufficiently complex. They're useful as guidelines for people who don't know how to write code yet—to help them avoid making obscenely complex functions when the functionality is reasonably separable into smaller, interestingly reusable components, to keep themselves from shooting themselves in the foot by repeating code where they should call a shared function, and so on. However, IMO, if you're still thinking about rules by a few years out of school, they're probably doing you more harm than good, causing you to write code with unnecessary layers of abstraction for the sake of abstraction.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  33. Sanity by stanlyb · · Score: 4, Funny

    You would be surprised how many delusional, idiot developers are out there.

  34. Re:Encryption by Animats · · Score: 2

    There's a great future in encryption. Think about it. Will you think about it?

    You're probably not qualified to think about. It's hard. Really hard. And very specialized.

    No new cypher is worth looking at unless it comes from someone who has broken a very hard one. - Friedman

  35. Re:I can think of one that Steve Jobs disagreed wi by ATMAvatar · · Score: 4, Insightful

    I would much rather my mechanic focus his efforts on being good at diagnosing problems and installing factory-made parts rather than troubling himself with building parts himself. I feel the same way about programmers. The simple components (like sorting algorithms) are largely available in libraries, and I would be more concerned that someone I work with know when to use a particular sorting algorithm than that he/she can code up one from scratch.

    --
    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
  36. Re:Two words by narcc · · Score: 2

    Sarcasm aside, it's a useful algorithm that beginners can easily understand. With the right prompts, they can even "invent" it themselves.

  37. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 4, Insightful

    "Find me a mechanic that can build a V8."

    I didn't write manufacture a V8 from scratch, I wrote "build".

    I rebuilt an engine, and I'm very far from an auto mechanic. And in the interest of keeping the record straight, I had help and advice. But that's my point here: I wrote "build", not "design and manufacture all the parts from scratch". It's all fine to get help and advice for coding, too. But I wasn't suggesting trying to independently re-invent internal combustion or anything like that.

  38. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 4, Insightful

    "I agree with the anon poster. You are an idiot. A computer scientist better be able to write a QS in their sleep, but a programmer better know how to find a suitable implementation already written."

    That's not a programmer, that's a hack just out of high school. There IS a big difference, and if you don't know what that difference is, you're paying too much money.

    Now tell me again who's the idiot.

    I wasn't suggesting that every programmer has to know how to do finite-elelement modeling, for fuck's sake. But if you don't know a Quicksort from a Bubble sort, or how to write them, you're not a programmer by any standard I ever heard of, and I've been around.

  39. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 2

    "Sometimes you need more than a mass-produced transport designed to a price for the lowest common denominator."

    Agreed. Just as engine mechanics fix engines -- for FAR less cost than simply buying a new one -- if you have a coder who actually knows how to code, maybe he or she can FIX a problem, rather than re-writing your whole application from scratch.

    In some ways this is even more important than in the engine mechanic analogy, because your software likely WAS written from scratch. So it's a hell of a lot cheaper to hire a code "mechanic" who knows what she's doing to fix it, than it is to do it all over again from the ground up.

  40. Re:I can think of one that Steve Jobs disagreed wi by jcr · · Score: 2

    Hey, thanks for the heads-up, because I don't want to work for you. I CAN jump through hoops, but I'm a couple of decades past the days when I was WILLING to do so.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  41. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 4, Insightful

    "Good software development is to a chemist As lego development is to a cook."

    Well, I have to tell you honestly: I don't know whether that went over my head, or under.

    But either way, it missed me completely.

  42. Keep It Simple. by jcr · · Score: 3, Insightful

    Hands down, the most important idea in programming. See the C++ disaster for proof.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  43. Foundation by fyngyrz · · Score: 3, Insightful

    Until you've programmed ASM for a micro controller, you really don't know what's going on under the hood, and you're almost certainly doomed to create bloated, slow-as-mud compared to what it *could* be, code.

    Sit down with a 6809 system emulation and learn about stacks and heaps and PIC and addressing modes and registers and memory and IO and optimizing loops and etc. Then you've got a foundation. Then C and a linker AND a debugger, then something OO, then HTML, CSS, Python, PostgreSQL, follow the basic PostgreSQL with detailed DB stuff, make sure the math is there through at least algebra and geometry, explain 3D from acos() as pooltable reflection to the various lighting tech... this would be a good first year or possibly two.

    You best learn to solve problems by... wait for it... solving problems.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Foundation by michelcolman · · Score: 2

      Very true. At the very least, programmers should know how a processor works, how memory (including virtual memory) works, etcetera. I find it disturbing that this is not even mentioned. They go straight to the high level stuff, which is important too, but intimate knowledge of the internals of a (generic) computer may keep you from producing bloated, slow code. Look at disassembled output from a compiler, step through the assembly code using a debugger and see what's the cost of high level constructs. Learn to choose where abstraction makes sense, and where it just slows things down without a real benefit.

      Code some simple algorithms from scratch and try to do everything you can to make them faster. I'm not saying you should actually write your own code for everything when you're building actual applications, by all means use the Standard Library, but for training purposes there's no better way to learn than by actually doing some of this low level stuff yourself.

      Architecture is important, sure, and you don't actually have to write much low level code anymore in most situations, but you should know that it's there, how it works, and how efficient or inefficient it is.

    2. Re:Foundation by TheRaven64 · · Score: 4, Insightful

      Until you've programmed ASM for a micro controller, you really don't know what's going on under the hood, and you're almost certainly doomed to create bloated, slow-as-mud compared to what it *could* be, code.

      I hear this a lot from people who write unmaintainable code that's full of 'clever' tricks that usually have no measurable impact on performance and, when they do, actually end up making things slower.

      A microcontroller has almost no relationship to the kind of system that you find in a modern desktop or even mobile phone. Some differences:

      • No multiprogramming, meaning your code is free to use all of the resources and you don't need to think about different load conditions.
      • Single core, so the most efficient code is always single-threaded.
      • Fixed latency, so you don't have to worry about things costing different amounts depending on conditions.
      • Flat memory hierarchy, so locality of reference (absolutely the biggest single performance win on a modern system) makes very little difference.
      • No FPU, so floating point operations are insanely expensive, when on a modern CPU they're much cheaper than some of the tricks people use to avoid them.

      Add to that, writing assembly for a short-pipeline, in-order processor is very different from an out-of-order superscalar architecture. If you want to write fast code, design good data structures and good algorithms. No amount of microoptimisation will make up for poor algorithmic design.

      --
      I am TheRaven on Soylent News
    3. Re:Foundation by TheRaven64 · · Score: 4, Interesting

      No, I'm saying that learning to program microcontrollers teaches you how to program microcontrollers. If that's your goal, it's fine, but it's disingenuous to claim that it's a good way of teaching a transferable skill. But if you've got any more straw men, feel free to throw them out there.

      --
      I am TheRaven on Soylent News
    4. Re:Foundation by Sique · · Score: 2
      Actually, x+2=4, what is x? is "modern Algebra". And it is also classical Algebra. Lets say, it's just Algebra.

      Algebra is the part of Mathematics that covers the properties of calculating operations. And in this example, we need the properties of the Addition operation of the Natural Numbers, to know x. As a computer's fundamental strength is the ability to perform many operations deterministically and really fast, knowledge of the properties of operations (vulgo: Algebra) is fundamental.

      --
      .sig: Sique *sigh*
    5. Re:Foundation by Ash+Vince · · Score: 2

      Until you've programmed ASM for a micro controller, you really don't know what's going on under the hood, and you're almost certainly doomed to create bloated, slow-as-mud compared to what it *could* be, code.

      That might apply if you want to create decent C code or something similar but if you are talking about web development or similar then learning assembler is just a complete waste of time due to the many layers of abstraction involved between the code and the hardware

      Then there is the issue that in many cases the code being slightly slower than it could be is not as important as it being easy to work on. When you end up with a huge project it makes sense to do things like modularise the code at the expense of performance so that each module can be looked at as a distinct entity.

      Sit down with a 6809 system emulation and learn about stacks and heaps and PIC and addressing modes and registers and memory and IO and optimizing loops and etc. Then you've got a foundation.

      A foundation that is completely irrelevant in many types of programming. People can be amazing developers without knowing any of that and just having a deep understanding of the language they actually use.

      You best learn to solve problems by... wait for it... solving problems.

      Exactly, but there is not need to solve problems on completely irrelevant platforms. Instead you can learn to develop perfectly well be picking a platform you might want to use and learning your way round that. Then pick another platform you are likely to use and learn your way round that as well.

      Then C and a linker AND a debugger, then something OO, then HTML, CSS, Python, PostgreSQL, follow the basic PostgreSQL with detailed DB stuff, make sure the math is there through at least algebra and geometry, explain 3D from acos() as pooltable reflection to the various lighting tech... this would be a good first year or possibly two.

      Now you start to get more useful. I would skip all that crap at the start and just go straight into learning a procedural language and an object orientated language. When I say learn them though, I mean REALLY learn them making sure you learn the shortfalls of both.

      The only reason I would say to skip some of the stuff you recommend is due to time. We only have a limited amount of hours available in life and so I would concentrate on learning languages that are relevant to what you want to do. We simply do not have enough time to become expert in enough languages to learn everything so try and concentrate on things that are relevant to what you want to do.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    6. Re:Foundation by TheRaven64 · · Score: 2

      I teach a postgraduate compilers course, so I definitely wouldn't downplay the importance of understanding how compilers work. The problem is that a lot of people know how compilers worked in the '70s and '80s and the techniques that made sense for optimising for a PDP-11 or VAX (or even i386) and these techniques can often hurt performance today.

      --
      I am TheRaven on Soylent News
    7. Re:Foundation by mrchaotica · · Score: 2

      Then there is the issue that in many cases the code being slightly slower than it could be is not as important as it being easy to work on. When you end up with a huge project it makes sense to do things like modularise the code at the expense of performance so that each module can be looked at as a distinct entity.

      You still need to know better than to use an n^2 algorithm when an n*log(n) one will do.

      Besides, web programming brings with it new performance concerns of its own, such as structuring your database schema to be efficient for the kinds of queries you're going to be running often, or knowing not to send 92 streams of information when you hit "apply" when all you really needed was an HTTP POST with some form data.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  44. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 3, Insightful

    "1. Don't use proven libraries to solve common programming tasks (e.g., collections).

    2. Write everything from scratch!

    3. Argue that it is a time and budget advantage to do so."

    No. That wasn't the point of this discussion at all.

    I highly recommend that programmers DO use proven libraries to solve common tasks. BUT, a programmer who is worth a real programmer's salary COULD write them herself if she had to, which means she also has the skill to identify and preferably fix bugs in said libraries. After all... open source software is all bug-free, yes? (Not that it has to be open source... just an example.)

    I wasn't saying a programmer should write everything from scratch every day. But if you don't know how to, you're SOL and at everybody else's mercy when something goes wrong. You're costing your company money. Because things go wrong.

  45. That list is stupid... by gigaherz · · Score: 4, Insightful

    Better list:

    1. 1. Be consistent.
    2. 2. Maintain proper variable/function/class names.
    3. 3. Put the code where it belongs.
    4. 4. Write comments when you still understand what you did.
    5. 5. Use existing libraries, whenever possible.
    6. 6. Write unit tests for your algorithms.
    7. 7. Choose the IDE with the better debugger.
    8. 8. Follow the guidelines, but don't obsess over them.
    9. 9. Open-source is good for the world, but not so good for your wallet (yet).

    I wanted it to be 10 but that's all I could come up with, that I would recommend any programmer, new or not.

  46. Re:quicksort better than OOP? by narcc · · Score: 2

    I've heard lots of good things about it. I just haven't heard anything about it that's unique to OOP. Hell, no one can even agree about what constitutes OOP!

    I'd ask you to defend it, but you'll just mumble something ridiculous about "modularity" and I'll be forced to laugh at you.

  47. Re:I can think of one that Steve Jobs disagreed wi by znanue · · Score: 5, Insightful

    I'd be interested to know what line of work you do, programming wise. My experience tells me that a lot of programming that is being done is meant to be powerful and meant to be built quickly. Running quickly and with low tolerance for faults is a little less important because very few things are mission critical. While anathema to the academic, it demands a certain skill set, which is the ability to very quickly assimilate new arbitrary knowledge about libraries, software, and code, that the programmer hasn't seen before. The result is a fragile sort of knowledge that often lacks formality and granularity but is sufficient enough to accomplish a task very quickly.

    This skill is not exclusive with the ability to write everything from scratch, but understanding a system through and through seems to often undermine the coder's speed at getting the product out because they want to do it 'correctly'. This specific tug of war, between programmatic idealism and pure ease of use often ends up being a major concern in the work I do because I am rarely satisfied with the 'easy' solution. Sure, sometimes doing it 'correctly' amortizes quickly and thus the up front cost should be paid, but other times it really just badly trades one resource (dev time) for another (execution time, time of the humans managing the software, time to market).

    I've met coders who talk like you, and when they do, they're so impractical in their overarching decisions that often the software is DOA because it doesn't do enough, or it took too long to write, or it was endlessly being refactored.

    You're probably doing work at a more basic systems level than I am. And, maybe that is why you have this philosophy. I used to think work at the level I'm doing now was uninteresting, but the problems are shifted into ones of integration, forward planning, and multi-discipline and away from algorithm, pure transaction, etc. There are also a buttload of programmers working at this level, and while I would love to say that we must hire only candidates who can write a minheap backed up by a btree... I think by far the more important qualification is that skill I was talking about, which is a lack of 'not invented here' syndrome and an ability to read other people's code / technical documentation very quickly and see how their architecture can fit into our needs with the minimal of fuss.

    To put it another way, most of the low level problems have been solved adequately enough for this level of work, but there are a whole slew of emergent problems that require more than just Pattern A + Pattern B to solve, and are just not that helped by understanding the machine instructions or by algorithmic knowledge. I believe that to be true for probably the many of the programmers that are gainfully employed. So, I could not agree with the notion that your hiring strategy would work well for most positions.

  48. Re:Stuff you should learn by K.+S.+Kyosuke · · Score: 2

    Or go for Go. Almost like C, but better suited for anything with more than one CPU core, and without certain awful syntactic baggage.

    --
    Ezekiel 23:20
  49. Re:I can think of one that Steve Jobs disagreed wi by michelcolman · · Score: 2

    And that's exactly why my DVD player takes 30 seconds to start up while a 30 year old vcr would start playing pretty much right away. Just throw some libraries together that do what you want to do, including the libraries required by those libraries, and finally including an entire linux or other OS because, well, otherwise you can't use those libraries. I wouldn't be surprised if the thing had a hypervisor and multiple OSes too.

    Programmers nowadays just bandaid lots of existing stuff together without knowing how it all works. The result is bloated software that requires gigabytes of memory while the same stuff used to work just fine on a 64k 8-bit computer.

    Can you remember how much stuff used to get done by applications using 64k of memory? And how much memory those same applications would gobble up if they were written today? That's the price of throwing libraries together instead of actually programming.

    That doesn't mean you actually have to write everything from scratch, you certainly should try to reuse existing code and libraries wherever possible, but you should also know how they work, what they do, and whether or not they are overkill for what you're trying to do.

    If you ask today's "programmers" to provide an engine for a kitchen blender, they'll use a V8 truck (not the engine of the truck, but the entire truck) and connect the blender to the wheels of the truck somehow. Being able to take the engine out of the truck would be a big improvement already.

  50. Re:I can think of one that Steve Jobs disagreed wi by baffled · · Score: 2

    Some people actually provide documentation with their code? Your point highlights the importance of quality documentation that allows an outsider to quickly understand a code base. Something quite useful in the open source world.

  51. Indirections ! by herve_masson · · Score: 2

    "All problems in computer science can be solved by another level of indirection"

    (David Wheeler)

    So true....

  52. Re:Continuous Integration by Anrego · · Score: 2

    Oh I totally get you on clearcase. It's one of those tools that people often succeed not because of, but inspite of.

    As to the origional argument, as someone said below, it comes down to scale and what's best for the specific project. Most of my career has been spent on large projects with many developers and in some cases multiple integration trunks, so I'm kinda skewed to the mindset that committing to trunk == ready and tested by developer. Everyone committing partially complete and untested work to trunk would be a complete mess.

    That said I try to maintain the pragmatic view that if something is working and causing no problems, it's probably not wrong, regardless of what best practices and conventions say. If what you are doing is working at whatever scale you operate at, and you don't believe branches would enable you to work better in your workflow, then it's the right choice!

  53. Re:Continuous Integration by Anrego · · Score: 2

    That's pretty much the workflow I've seen most of my career. The big failing is when two people are working on large feature branches in the same area, but that can be mitigated by good project management (having two people working on different major changes in the same area is usually a terrible idea imo).

    It's always usually possible to do a custom integration build for really big stuff (trunk + your branch(es)) and run the full test suite.

  54. Re:I can think of one that Steve Jobs disagreed wi by Ash+Vince · · Score: 2

    But if you don't know a Quicksort from a Bubble sort, or how to write them, you're not a programmer by any standard I ever heard of, and I've been around.

    I have been a professional developer for the past 10 to 15 years and have not had to write a sorting algorithm in almost 2 decades (since college, at least 15 years ago). I dare say I could write one pretty quickly if asked, but it would be a much more efficient use of my time to just google for one since there are tons of them out there without any licence restrictions. What I could do though is understand every line of what I found at a glance and easily make any subtle changes needed to drop it into what ever project I was working on.

    Writing this sort of basic stuff is a useful educational tool since the model answer is pretty well established, but you very rarely have to rewrite the same previously solved tasks once you are getting paid for your time.

    --
    I dont read /. to RTFA, I read /. to offend people in ignorance.
  55. Re:I can think of one that Steve Jobs disagreed wi by mrt_2394871 · · Score: 2

    "Quicksort is already implemented a thousand times, so there's no need to implement it again, just find which library you need."

    Yes, that's true, but we're talking about education here, not building websites.

    Also, knowing about QS implementations lets you know when it's been done wrong.

    Case in point: Microsoft's C runtime library shipped around the time of Windows NT and Visual Studio 6 had a sub-optimal qsort implementation - it took 97 seconds (on a 600MHz Athlon) to sort 260,000 integers with a constrained set of values (0-180), whereas other implementations (eg Numerical Recipes) could do it three orders of magnitude quicker.
    Delving in, the qsort() algorithm didn't exchange elements where the value equalled the partitioning element, which leads to increased comparison function calls (effectively proportional to 1/range).

  56. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 2

    "Right - but if I catch a programmer ever actually implementing a quicksort by themselves though, they're fired."

    Well, I won't argue with that. As I stated earlier, I don't think one should spend every day re-inventing the wheel. But knowing how to make a wheel if you have to is a valuable skill.

  57. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 2

    "I dare say I could write one pretty quickly if asked, but it would be a much more efficient use of my time to just google for one since there are tons of them out there without any licence restrictions. "

    Please read what I wrote a bit more carefully. I did not write that I think you should be writing such things on a daily basis. And I certainly don't recommend it. But you should be able to, should the need arise.

  58. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 2

    "I've met coders who talk like you, and when they do, they're so impractical in their overarching decisions that often the software is DOA because it doesn't do enough, or it took too long to write, or it was endlessly being refactored."

    Who talk like me? It's funny, because I'm not even disagreeing with most of what you say. But a quicksort is not rocket science, and anybody who studied programming or CS in college has been exposed to how they work. If they have any schooling behind them with significantly more depth that PHP scripting, they were probably also exposed to how hash tables are contstructed.

    Why is it arrogant to insist that they remember some of the most basic things they learned? If I were to hire a mechanical engineer I'd want to be sure he knows trigonometry.

    But if you're talking about some guy pounding rivets, well, he's not an engineer. He's a hack laborer, and he probably doesn't need to remember his trigonometry. And that's exactly the difference I was talking about.

  59. Re: I can think of one that Steve Jobs disagreed w by Jane+Q.+Public · · Score: 2

    "There is absolutely no reason to have the various sorts memorized, no matter what you do for a living."

    THAT is absurd. Seriously.

    "Not once have I ever needed to write a sorting function or try to remember the differences in implementation of the different sort algorithms. It just isn't important."

    And I'd be willing to bet that the fact that you don't even remember something so ridiculously simple and fundamental has a direct relationship to the quality of your code.

    It's only a guess and I could be wrong. But if I were to bet on it, that's they way I'd bet.