Forgot your password?
typodupeerror
Programming Idle

What Are the Genuinely Useful Ideas In Programming? 598

Posted by Unknown Lamer
from the lattices-are-pretty-cool dept.
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.'"
This discussion has been archived. No new comments can be posted.

What Are the Genuinely Useful Ideas In Programming?

Comments Filter:
  • by Cryacin (657549) on Tuesday October 08, 2013 @12:04AM (#45066473)
    The "on" button.
    • "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.

    • by Z00L00K (682162) on Tuesday October 08, 2013 @12:34AM (#45066623) Homepage

      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.

      • by Jane Q. Public (1010737) on Tuesday October 08, 2013 @01:38AM (#45066891)

        "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.

        • by ATMAvatar (648864) on Tuesday October 08, 2013 @02:01AM (#45067017) Journal
          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.
        • by jcr (53032)

          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

  • by Krishnoid (984597) * on Tuesday October 08, 2013 @12:06AM (#45066479) Journal

    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.

    • by gentryx (759438) * on Tuesday October 08, 2013 @12:34AM (#45066617) Homepage Journal

      Exactly. Code Complete is a great book. I liked The Pragmatic Programmer -- from Journeyman to Master [amazon.com] 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.

    • by bondsbw (888959)

      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.

  • Regular Expressions (Score:5, Informative)

    by Kohath (38547) on Tuesday October 08, 2013 @12:09AM (#45066495)

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

    • by jlar (584848) on Tuesday October 08, 2013 @12:15AM (#45066529)
      "Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems."

      - Jamie Zawinski
      • by cold fjord (826450) on Tuesday October 08, 2013 @02:03AM (#45067027)

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

        • by knarf (34928)

          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 [pcre.org] is as popular as it is after all...

    • by gl4ss (559668)

      yeah that'll get the kid to get interested in programming!

      how about just simple stuff? nibbles.bas . something that makes him see that the programs are not magic but something he can understand, modify and create.

      some people went on to recommend shit like db guides and other stuff. that'll come naturally if the kid gets into his head that the programs are just programs. if he gets into his head that some programs are just magic created by pixies over at oracle land then he'll always be just an user. might j

      • by pjt33 (739471)

        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.

    • by H0p313ss (811249) on Tuesday October 08, 2013 @01:38AM (#45066887)

      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.

  • by Laxori666 (748529) on Tuesday October 08, 2013 @12:09AM (#45066499) Homepage
    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.
  • by Erik_Kahl (260470) on Tuesday October 08, 2013 @12:11AM (#45066507)

    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.

  • by jgotts (2785) <[moc.liamg] [ta] [sttogj]> on Tuesday October 08, 2013 @12:14AM (#45066519)

    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.

    • by pezpunk (205653) on Tuesday October 08, 2013 @12:25AM (#45066577) Homepage

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

    • by tlhIngan (30335) <slashdotNO@SPAMworf.net> on Tuesday October 08, 2013 @12:34AM (#45066625)

      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.

    • by Anrego (830717) *

      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

    • by bzipitidoo (647217) <bzipitidoo@yahoo.com> on Tuesday October 08, 2013 @01:16AM (#45066785) Journal

      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.

    • by mcvos (645701)

      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 suff

  • XML? Really? (Score:2, Insightful)

    by Anonymous Coward

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

  • by Crash McBang (551190) on Tuesday October 08, 2013 @12:16AM (#45066535)
    People don't know what they want till they see it. Prototype early, prototype often.
  • by TopSpin (753) on Tuesday October 08, 2013 @12:18AM (#45066539) Journal

    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.

    • Not just a stack, a queue as well. Of course, if you look at them right, they're two sides of the same coin because they both make you deal with events or data in an ordered manner.

      Back when I was actually doing programming, I spent several years working with Dan Alderson, [wikipedia.org] at JPL. His data structure of choice was always the linked list, either one way or two, depending on what was needed at the time. Yes, it's an abstraction layer, but it's a very useful one when you don't know how many items you're go
  • Software componentization.

    I'll use a generic term here, whether the specific implementation at hand is via OOP, a defined API to a DLL, a web service, or any of myriad other concrete forms.

    The list as presented is indeed core to being able to develop an application up to a certain level of complexity, and in a learning framework where one can conceivably be able to, and can be expected to, understand or visualize the entirely of the project.

    Beyond that level of complexity, though, the notion of being able t

  • GUI programming is a new thing and still it's rapidly transforming. Change that to event-driven application architecture, which almost all GUI apps have.

    Relational databases, well... NoSQL would be enough for this list.

    Model-view stuff seems to be missing from the list, and all kinds of patterns in general. Also, totally missing from TFS is client-server models, be it the backend-frontend model of web apps, or traditional TCP/IP protocols.

    That being said, if you master every aspect of Qt5 including QML and

  • You know rules of thumb like "NO, YOUR FUNCTION SHOULDN"T BE 5000 FUCKING LINES LONG. IT SHOULD FIT ON THE GOD DAMN SCREEN." or "KNOCK IT OFF STUPID. YOU SHOULD HAVE WROTE ONE FUNCTION TO DO THAT. NOT CUT AND PASTE THOSE 10 LINES OF CODE 70 TO 80 TIMES." (Before anyone asks, yes I've literally seen programmers, software engineers, or whatever we're calling them with years of experience make amateurish blunders such as the above. And yes, they really did do those 2.)
    • by dgatwood (11270) on Tuesday October 08, 2013 @01:38AM (#45066897) Journal

      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.

  • He lists quicksort as more useful than OOP? Quicksort is cool, but.......

    I'm a C programmer, so I understand people who say OOP isn't everything, but the concepts you learn with OOP are a whole lot useful than the concepts behind quicksort. You even use those concepts when you use a language like C. It could be argued that learning algorithmic complexity is more important than OOP, but that is a different than learning quicksort.
  • The Closure (Score:5, Insightful)

    by gillbates (106458) on Tuesday October 08, 2013 @12:23AM (#45066571) Homepage Journal

    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.

  • Code Comments (Score:4, Insightful)

    by gimmeataco (2769727) on Tuesday October 08, 2013 @12:25AM (#45066575)
    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.
  • Getcha a really nice GREP tool of some sort where you can search through source code easily and do replacements when necessary. I use mind all the time. Comes in quite handy when you're working on code written by other developers.
  • KISS principle (Score:2, Insightful)

    by Anonymous Coward

    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.

  • Seek to understand the various levels of abstraction available in any problem -- and to solve the problem at the appropriate level. It's a complicated lesson, and something that will take a long time to get right, but once you do, so many things fall out naturally, like clean and reusable code, the need for different languages and tools, design patterns, and on and on and on.

  • If you're not sure if you want to use a pointer driven data structure or an array, favor the array. In languages like C++, when you use pointers, you can deference it and your code will work perfectly for the time being. So when you're doing your standard debug cycles of checking your code for errors, these can pass by, and not be seen again for days or weeks. A dereferenced pointer can end up causing your code to crash abruptly over completely arbitrary things. The only way to debug this is to read thr
  • Input validation (Score:5, Insightful)

    by KevMar (471257) on Tuesday October 08, 2013 @12:34AM (#45066619) Homepage Journal

    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.

  • There's a great future in encryption. Think about it. Will you think about it?
    Beware of charming open source projects via forums and irc rooms. You will be falling into a personality cult.
    Become a polymath, you will need history, science, art, music, math and much more to fully understand the needs of your buzzword touting clients.
    Beware of the security clearance - years of your life will be dedicated to larger projects with real world stories, the press and politics.
    Be aware of who your working for
    • by Animats (122034)

      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

  • by KagatoLNX (141673) <kagato@sCOUGARouja.net minus cat> on Tuesday October 08, 2013 @12:40AM (#45066643) Homepage

    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).

    • by jasno (124830) on Tuesday October 08, 2013 @02:47AM (#45067241) Journal

      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.

  • Understand that every line of code you write may/will be maintained by somebody else. Architect/Design/Write/Test accordingly.

  • Arrays start at zero and go through size-1.

  • Left-corner design (Score:5, Insightful)

    by steveha (103154) on Tuesday October 08, 2013 @12:51AM (#45066697) Homepage

    The most important book I read as a beginning software developer was Software Tools in Pascal [google.com]. 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 [google.com], where the programs were written in a language called RATFOR [wikipedia.org]. 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.

    • 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 fr

      • by steveha (103154)

        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 [wikipedia.org]

        And

  • Learn to manipulate text and you can do just about anything.
  • The behavior of floating-point arithmetic. This wasn't covered in my university curriculum, and was necessary in tasks including graphics, machine learning, and finance once I got into the industrial world.

    As a manager, possibly the single most important skill for me was learning the ways to estimate the time required for complex programming tasks. Once you're tackling problems beyond the scope of a single programmer, coordination is required, and schedule estimation is essential.

  • by Rinikusu (28164) on Tuesday October 08, 2013 @01:07AM (#45066747)

    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.

  • 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?

    • s/contractor/contactor/

      Damn it, that's the 2nd time this week I trusted spell check erroneously on that same word. "add to dictionary"

  • by SuperKendall (25149) on Tuesday October 08, 2013 @01:12AM (#45066775)

    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.

  • by VernonNemitz (581327) on Tuesday October 08, 2013 @01:27AM (#45066839) Journal
    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.
  • by Todd Knarr (15451) on Tuesday October 08, 2013 @01:38AM (#45066895) Homepage

    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.

  • Sanity (Score:5, Funny)

    by stanlyb (1839382) on Tuesday October 08, 2013 @01:48AM (#45066947)
    You would be surprised how many delusional, idiot developers are out there.
  • Keep It Simple. (Score:4, Insightful)

    by jcr (53032) <.jcr. .at. .mac.com.> on Tuesday October 08, 2013 @02:53AM (#45067267) Journal

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

    -jcr

  • by gigaherz (2653757) on Tuesday October 08, 2013 @03:13AM (#45067329)

    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.

  • by herve_masson (104332) on Tuesday October 08, 2013 @08:28AM (#45068633)

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

    (David Wheeler [wikipedia.org])

    So true....

"Mach was the greatest intellectual fraud in the last ten years." "What about X?" "I said `intellectual'." ;login, 9/1990

Working...