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

598 comments

  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 bondsbw · · Score: 1

      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.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    2. 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. Re:It's not just about the concepts by Joce640k · · Score: 1

      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.

      I'd recommend a good all-round education.

      --
      No sig today...
    4. Re:It's not just about the concepts by TheRaven64 · · Score: 1

      Practice with supervision and review. You don't get better by repeating mistakes without learning from them...

      --
      I am TheRaven on Soylent News
  3. Continuous Integration by Anonymous Coward · · Score: 1

    I'm talking about two points here:
    1. The tools: have a CI server to do automatic validation.
    2. The concept: try to integrate early, integrate often. Your automatic validation will catch errors and you'll be able to solve them quickly. If you wait a long time to integrate, you will just have a huge bunch of stuff to integrate, and possibly too many errors.

    The second point is why I prefer not using feature branches in version control (and yes, I use DVCS).

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

    2. Re:Continuous Integration by Anonymous Coward · · Score: 0

      Well, that's how we do it, but it's because people in my department had a tendency to wait too long to integrate their changes (we moved from ClearCase to Mercurial, and people still had a habit to avoid merging because of the hell it was in ClearCase).

      Of course, in other companies, feature branches may be a better idea. But in general, I'd go with: avoid feature branches for short-lived features, allow them for long-lived feature branches.
      That's just my idea of it. However, I'm not a manager, so I don't go with 'NEVAR!' or 'ALWAYS!'.

    3. Re:Continuous Integration by umghhh · · Score: 1

      you just worked on different projects and that is why you have different best ways of working. Projects vary in size, complexity, team size, content and setup working on it etc The projects differ also with they chief master bosses - with different combinations of technical and management skill. This does not mean This does not mean there are no lessens learned there, it is just that one lesson learned does not fit all. This is something that majority of people do not think about when advocating their own policy, method, framework etc. There are projects in which working on main is ok. There are situations where it is not ok and still some special forces units are allowed to do that anyway. It takes quite some experience and brain power to chose best suited way and will to see the original choice was wrong and new one must be applied.

    4. Re:Continuous Integration by shentino · · Score: 1

      What you want to do with feature branches is integrate from trunk early and often, but keep the feature out of the trunk itself until it is ready.

    5. 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!

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

    7. Re:Continuous Integration by sapgau · · Score: 1

      Feature integration is always a pain because the developer working on it does not accommodate the rest of the team working on the trunk. Instead of documenting, informing the team of what changed, validating parameters and processing exceptions it is the rest of the team that have to accommodate HIM/HER like if they were royalty! These devs have to understand that half of the work on these features is the integration effort needed to prevent breaking the code already checked in.

  4. The most basic by Anonymous Coward · · Score: 0

    Problem solving.
    The ability to think through how to put pieces together to solve a problem.
    Without this ability, nothing else is useable.
    McLae

  5. 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 Anonymous Coward · · Score: 0, Offtopic

      You, sir, deserve to be modded down.

    3. Re:Regular Expressions by gl4ss · · Score: 1

      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 just as well recommend learning vbscript for excel(has it's uses, if he is an _user_ of excel).

      most regexp users are just using "magic", don't go that route to introduce someone to be a programmer. show him that he, or anyone, can be a programmer and not just an user of programs.

      --
      world was created 5 seconds before this post as it is.
    4. 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
    5. Re:Regular Expressions by Anonymous Coward · · Score: 0

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

      Why is this rated funny?

    6. 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
    7. 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
    8. Re:Regular Expressions by Anonymous Coward · · Score: 1

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

      Laugh it up kids when the alternative is someone spewing a few hundred lines of crappy parser code regular expressions start to look real good.

    9. Re:Regular Expressions by narcc · · Score: 1

      Spot on.

    10. Re:Regular Expressions by Beryllium+Sphere(tm) · · Score: 1

      For one thing, it reminds people of https://xkcd.com/208/

    11. Re:Regular Expressions by umghhh · · Score: 1
      and there are even applications where they do not play any role at all.....

      I think the GP was just baiting the trolls.

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

    13. Re:Regular Expressions by metamarmoset · · Score: 1
    14. 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
    15. Re:Regular Expressions by brxndxn · · Score: 1

      I need to parse through 1000's of XML files and make sure { } are around all 'tags' in the files. I need to make sure of about 40 other rules that apply to these particular XML files.

      Since everyone likes to knock Perl and Regular Expressions, what could possibly be a quicker and easier way to handle this? FYI, I did it in Perl - and I just could not imagine the amount of code I would have had to write in anything else..

      --
      --- We need more Ron Paul!
    16. Re:Regular Expressions by Anonymous Coward · · Score: 0

      Well, yes, they are. But it is essentially a scripted language embedded in another language. For things like that Lua is also pretty useful.

      Regular expressions also aren't very efficient, not does it improve readability. This means that it only is useful if you can solve the problem faster by writing it with regular expressions than you can with whatever language you are using it form.

    17. 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
    18. Re:Regular Expressions by jabberw0k · · Score: 1

      It's only a flesh wound!

    19. Re:Regular Expressions by arielCo · · Score: 1

      Very funny, and it's a matter of knowing when to stop complicating them and write a bit of code to help (eg switch statements).

      That said, basic knowledge is sorely lacking among coders.

      --
      This post contains no rudeness or derision of any kind. All arguments are friendly. Terms and exclusions may apply.
    20. Re:Regular Expressions by Anonymous Coward · · Score: 0

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

      Agreed. I see this sort of complaining about perl and/or regexes all the time, and I just don't get it.

      For the regex stuff, I get that regexes are difficult and people aren't generally very good at them. So I can see how when someone solves a problem with a regex, it can make it difficult when someone else (who sucks at regexes) has to take over that code later. But the solution there is for everyone else to actually educate themselves on how to use regexes better. To complain and make jokes about it is just ignorant. It reminds me of other ignorant behaviors, like christians mocking scientists over the "absurdity" of evolution.

      As for perl, that I just don't get. I mean, I understand that perl has a lot of REALLY flexible syntax, and that you can do some REALLY outrageously funky stuff with it. But for the most part, and in the way most people use it, it's not really any different that any other programming language. 99% of the perl code that I write, and 99% of the perl code that I've seen other people write, should be fairly easily understandable by anyone familiar with C++, java, or any other modern programming language. It just takes a little time to familiarize yourself with the language. And I know perl and regexes usually sort of go hand-in-hand, so it sort of ties back to my previous point about those, too.

    21. Re:Regular Expressions by H0p313ss · · Score: 1

      This means that it only is useful if you can solve the problem faster by writing it with regular expressions than you can with whatever language you are using it form.

      In my experience there is something close to a 10/1 ratio between gratuitous pointless uses of regular expressions and effective useful ones.

      My favorite abuse case is where no real wildcarding is done and all they really want to know is, "does this string contain this substring". I find extreme cases in bad perl.

      I found a build script that was attempting to prepare localization templates, it would build a regular expression for each variable it was trying to replace (with no real wildcarding of course) and then evaluate each line in the template with every expression. Since the number of lines in the template were directly proportional to the number of variables this was n^2 evaluations.

      I replaced this with a simple linear approach where a look up table with all the translations are read into a lookup table in memory and each line of the template can be scanned character by character.

      The resulting script went from O(n^2) with regular expressions to O(n) with simple character comparisons, our problem input went from 20 minutes to process to less than a second, 1200 times faster.

      Regular expressions are very powerful, but they are no substitute for thinking or datastructures or algorithms.

      Don't teach new programmers regular expressions, teach them to think. Teach them how to analyse algorithms. Teach them how to build datastructures.

      Then, once you've done all that, then you can teach them regular expressions, but make sure they know what they're doing. (And it won't work, they'll immediately start abusing them, happens every time.)

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    22. Re:Regular Expressions by Anonymous Coward · · Score: 0

      Whenever you learn a new feature, you'll abuse it. Some people stay at that level, some actually learn how to use it properly, and some conclude from the abuses that the feature itself is bad.

    23. Re:Regular Expressions by SleazyRidr · · Score: 1

      If you're having perl problems, I feel bad for you, son. I had 99 problems, so I used regular expressions. Now I have 100.

    24. Re:Regular Expressions by SleazyRidr · · Score: 1

      They should call you Mario, cause you just got 1 up'd.

    25. Re:Regular Expressions by c · · Score: 1

      No... if it's perl, there's more than one way to do it, and usually a few more ways to do it wrong. Conservatively, I'd say they've got at least six or seven problems.

      --
      Log in or piss off.
    26. Re:Regular Expressions by H0p313ss · · Score: 1

      100% agreed.

      Regular expressions are but one tool, but for far too many people it's a hammer and every problem is a nail.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    27. Re:Regular Expressions by Anonymous Coward · · Score: 0

      Parsing expression grammar (PEG) are RE's on steroids.

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

    28. Re:Regular Expressions by TheSpoom · · Score: 1

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

      If you're searching through non-structured text, especially small strings, regular expressions help tremendously. If you're trying to search through structured text like HTML, you should use a parser.

      That quote applies but only in certain circumstances; I find that people overuse it.

      --
      It's better to vote for what you want and not get it than to vote for what you don't want and get it.
      - E. Debs
    29. Re:Regular Expressions by pseudorand · · Score: 1

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

      There's something more complicated than a few lines of perl code?

      Seriously though, perl is an abomination and, while a revolution when it was first written, Larry Wall should be ashamed of himself for not encouraging people to chose a readable and user friendly scripting language for the 21st century. That said, I write most stuff in perl simply because it's already installed on just about every linux box in existence, packages for just about everything are available via my OS package manager and it actually does work just as well on Windows via ActivePerl when I need it to.

      Why can't distros rewrite stuff in Ruby already and NOT install perl by default.

    30. Re:Regular Expressions by Alomex · · Score: 1

      Then you are only writing baby regular expressions.

      At an open source project written in Perl we used to have lengthy discussions if a given regular expression would catch all instances of a specific language construct. This was a discussion between Perl ninjas, mind you, and often we would discover to our surprise that a seemingly correct expression wasn't.

      It is very difficult to debug a regular expression with more than 50 terms.

    31. Re:Regular Expressions by Alomex · · Score: 1

      Actually look a bit deeper still and you'll see that people defending Perl regexps have never written a industrial size regular expression based application. Because if they had, they would realize that debugging complex regular expressions (in the sense of determining if it properly catches all instances) is _hell_.

    32. Re:Regular Expressions by chromas · · Score: 1

      I had 100 luftballoons but then I misused regular expressions. Now I'm hiding in a bunker.

    33. Re:Regular Expressions by Anonymous Coward · · Score: 0

      rm -rf leg*

    34. Re:Regular Expressions by Anonymous Coward · · Score: 0

      Jamie Zawinski, whoever he is, was clearly an idiot.

      Regular expressions are finite state machines are regular expressions, the equivalence can be demonstrated mathematically. Finite state machines, whether implemented formally or ad-hoc are the underpinnings of pretty much every real world program (those that interact concurrently with the external world, rather than computing from a set input to some end state).

      Since parsers are generally a required part of any program and parsers are always implemented as finite-state machines, a regular expression is simply a convenient notation for a parsing grammar, with the alternative being a BNF or CF grammar.

      I often make the argument that parsing ought not be part of normal programs, and that the OS should provide more structured interfaces for storing data structures and communicating between processes, but these arguments are not well received, primarily because of cliched aphorisms like "those who don't understand unix are doomed to recreate it, poorly.", to which I respond "but what of those who DO understand unix, but reject it based on it's flaws", for some reason many interpret that aphorism as "unix is flawless".

      Since in this world of unix-is-god, parsers have to be recreated again and again, regular expressions are an indispensable tool for alleviating the burden of tiresomely writing parsers for data that in an alternate future would have been passed, structure-preserved form one program to the next. Instead we are stuck in over 40 years of bickering over trivial format disputes.

    35. Re:Regular Expressions by Anonymous Coward · · Score: 0

      I've written a web app and a server-side API in perl, and believe me, perl is an absolutely terrible language that lets you get away with murder.

      Thanks.

  6. Brian Harvey CS 61A by Anonymous Coward · · Score: 1

    Structure and Interpretation of Computer Programs

    https://www.youtube.com/watch?v=GAHA0nJv8EA

    1. Re:Brian Harvey CS 61A by narcc · · Score: 1

      Overrated

    2. Re:Brian Harvey CS 61A by Anonymous Coward · · Score: 1

      Overrated

      Please elaborate.

    3. Re: Brian Harvey CS 61A by Anonymous Coward · · Score: 0

      He'll scheme you to death!

      I took his class in '08, I was not into math and had a hard time but enjoyed messing with the scheme interpreter until it made sense... Then I got it stuck in my head that the only way to be free was to stop the insanity of programming languages, why should there be a few, a few dozen, hundreds; all of computer science is a branch of mathematics that doesn't know that it is mathematics any more, so they keep reinventing the language level expression because math isn't even copyrightable or patentable, we doomed to repeat scheme over and over in schemes of lisp and lispy schemes of grand schemes of people who failed to understand the scheme.

      Harvey was old school in a world that didn't understand the power of computers, neither do you unless you program in scheme/lisp/forth/assembly and realize all the high level stuff is crap invented to keep the user happy and passively entertained. The mother of invention is hardship and that makes you a user of the pretty colors and GUI interfaces, until you program them...

      Scheme on my fellow schemers!

      Hats off to Harvey!

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

    1. Re:lowest common denominator by Jane+Q.+Public · · Score: 1

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

      No, it isn't. It's INTENDED to be the opposite: a list that master programmers can agree every non-master should know.

      You have to admit: there's a lot of master-level programming talent who check in to Slashdot.

    2. Re:lowest common denominator by Anonymous Coward · · Score: 0

      I'm not sure I buy it. He's saying he wants to remain uncontroversial but he includes UNIX as almost the first item on the list. What does that even mean? The underlying design of Linux is a long way removed from the design of AT&T UNIX; it supports manycore machines for a start. Does he mean the UNIX interface? It's called POSix for a reason :) No way to wait on a semaphore and a socket in the same call. Patchy async I/O. A ton of historical crud. As soon as I see UNIX listed in this way I know the person involved has a dim view of the NT kernel coming from hearsay and not ever having used it, even though it's dominated the office computing industry for the last 20 years. If he wants uncontroversial, maybe he should leave his hidden biases at home ;)

      Meanwhile, mature organizational principles like object orientation, and ancient coding ideals like referential transparency, don't get a mention because they're "controversial"? In what non-ivory-tower setting is class-based code organization even remotely controversial?

    3. Re:lowest common denominator by Hognoxious · · Score: 1

      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.

      Or be able to avoid the need in the first place.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  8. Indirection and caching by Anonymous Coward · · Score: 0

    The two duct tape equivalents for IT.

    "Indirection can solve any problem in software, except for too many layers of indirection."

    - Anonymous

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

  10. Does it do what you want? by Anonymous Coward · · Score: 0

    No? Then keep hacking.

    That's all you need to know in order to learn programming.

    1. Re:Does it do what you want? by Anonymous Coward · · Score: 1

      Given the average quality of software, I fear that's indeed the mindset of the majority of programmers.

  11. databases by Anonymous Coward · · Score: 0

    database transactions; the 'relational database; ... I am trying to narrow it down to an uncontroversial list

    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.

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

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

    3. Re:databases by Anonymous Coward · · Score: 0

      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.

      Ah, the old saying, if all you have is a hammer you start seeing nails everywhere.

    4. Re: databases by Anonymous Coward · · Score: 0

      Have you never done a write() and wondered where the data you sent to disk went?

      If it's anything like the rest of my data I'm pretty sure it went to /dev/null

    5. Re:databases by Anonymous Coward · · Score: 0

      I think that you are confusing normalization theory with the relational model. A physics engineer, a graphics engineer, does not need to know about how relational dbs work, transactions, locks, etc. A web dev specializing in UX and javascript does not need to know about the iso concurrency levels, and the alternatives, about triggers and log shipping mode of data replication for example. I wouldn't call db niche, but I would say it is not purely a general concept that all devs need understand.
      What devs should understand is normalization, and what kind of problems different data structures present to their own impls.

    6. Re: databases by isorox · · Score: 1

      Have you never done a write() and wondered where the data you sent to disk went?

      If it's anything like the rest of my data I'm pretty sure it went to /dev/null

      No problem, just read it back from /dev/random

      Seek time's a bitch though

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

      As a numeric methods guy, I've never had a use for databases in any of my jobs. But as a general user, other people's *easily corrupted* databases have been a frequent source of headaches. I've had countless cases of network disks unmounting without the OS flushing its cache properly first, thus corrupting databases beyond repair.

      I'm sure a *good* database guy would guard against such problems. But too many (even pros at large houses) don't.

    8. Re:databases by Alkonaut · · Score: 1

      If you work on games, desktop applications, web frontend etc. the database is by no means essential. I have programmed for many years, mostly heavy desktop applications, without having to use relational databases (of course there is *data* but usually structured in binary, text or xml). I can see your point about structures and pointers being somewhat analogous to tables and relations *but* unless you are converting a DBA into a developer, wouldn't most developers see it the other way around? That is, when they see a relational db table for the first time (having coded for a while) they see the similarity to a struct or object?

    9. Re:databases by Half-pint+HAL · · Score: 1

      Looking at it another way, one of the biggest gaps in computing is that we stick to a single-paradigm in most programming, and multi-paradigm programming scares most people. Automated database querying is about the only multi-paradigm experience a lot of programmers ever get. (Shame most of the SQL APIs are so poorly integrated into their host environments.)

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    10. Re:databases by dgatwood · · Score: 1

      Depending on what you mean by "physics engineer", there's a good chance he/she will use one as a data source, albeit usually a fairly simple one. Accessing a database table is easier than parsing a flat file, generally speaking. A graphics engineer either falls into that "mostly down at the kernel level" category or will end up reading model data blobs from a database for some project eventually. And a web dev doing the JavaScript side needs to at least understand enough about what's happening under the hood to be able to ask good questions and understand why only certain things are possible. Mind you, these are very basic uses of a database, and require only the most lightweight understanding of how things work.

      Nobody who isn't deploying servers needs to understand data replication. That's a tiny niche area in the database world. Similarly, most people don't need to know concurrency details. That said, I think everyone should at least understand the basic concepts—tables, primary keys, normalization, etc.—and the easiest way to learn those concepts is by interacting with an actual database.

      --

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

    11. Re:databases by muridae · · Score: 1

      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.

      One could look at it the other way, once you understand OO and pointers, you can understand databases. I think understanding ACID is more important, as you say the concepts from other things will lead to understanding.

      And before anyone points out "Language_X doesn't use pointers, don't burden a new coder with them!" you might want to think about how your CPU functions. The language may hide pointers away out of sight, but there is a benefit to knowing how the CPU works. Pointers, 2s-complement, various ways to represent floating point values . . . there is a long list of things hidden out of sight that a good coder should learn about at least in passing. Too many don't, and it always scares me when I see dollars and cents stored as a single float, instead of a fixed point or two integers (take your pick of how many bits, or how to represent sign).

  12. 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 GoodNewsJimDotCom · · Score: 0

      Sir, you're the type of person I'd like to work with(and hey I'm looking). I typically pick up languages in about 2 weeks to be able to crank out reasonable code then move towards mastery over time. I agree that having a general idea on how to code is better than any specific language. However HR doesn't see that today. They demand you know all sorts of specific technologies as if you couldn't pick them up on the job.

      I have 10+ years in C/C++, but haven't touched it much in 4 years so I'm rusty for tests, but I can code in it. I applied to EA, and they had a multiple choice test on arcane syntax. It was pretty horrible. I'm reminded of the time where Einstein couldn't remember how many feet were in a mile. Einstein's reply was "I don't know, why should I fill my brain with facts I can find in two minutes in any standard reference book?” We're still in an era where the hiring practices can reject competent people, but yet still can hire inept people often. At least Google finally realized those "put you on the spot brain teasers" aren't good for interviewing.

      Hey, if anyone is looking to hire a solid programmer who's been programming steadily for 24 years, send me an email Jimjobseek AT yahoo.com

      I'm a very strong programmer, with a specialization in rapidly prototyping(speed development).

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

    5. 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"
    6. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      +1 from an AC who's coded for 26+ years.

    7. Re:After 30 years of programming by jafac · · Score: 1

      I've found that Estimation is a job that greatly improves with experience. 20 years ago, I couldn't estimate for shit. Now, I'm pretty good. After a few projects of various types, as long as you remember how long previous projects took, you can breakdown your tasks, and estimate based on similar tasks. Use RAND's 3-point estimation, (more commonly known as PERT). With ready access to a reference, it's actually not technically complicated, and is rarely wrong. Even if your project is something new that you've never done before - there are likely substantial portions of the project that you HAVE done before. But the key is the experience.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
    8. Re:After 30 years of programming by Anonymous Coward · · Score: 0

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

      Well most of us have juniors that do the actual grunt work, so anything from twice the time to infinity is acceptable. :)

    9. Re:After 30 years of programming by Jane+Q.+Public · · Score: 1

      "You should be able to pick up any language or environment on the job."

      Tell that to somebody who's been doing PERL or Tcl for 10 years.

    10. Re:After 30 years of programming by gl4ss · · Score: 1

      "SDK's come and go, rock'n'roll is forever!"

      that's a good line to get hired with.

      a fucking bullet point list of xml, javascript, json and other terms is the last thing in the world a master programmer would be giving a kid to get him started..

      does a carpenter start his lessons with "yeah, bosch is a good brand to buy". fuck no, no.

      --
      world was created 5 seconds before this post as it is.
    11. Re:After 30 years of programming by phantomfive · · Score: 1

      using bubblesort is bad, but if you know you're only sorting 10 items ever, it'll work in a pinch.

      And actually be faster. In multiple different implementations of this, I've empirically tested that around 8-10 elements is where quicksort starts going faster than bubble sort, because the constant for quicksort is larger than the constant for bubble (YMMV depending on implementation, architecture, etc don't trust random people on slashdot for anything that matters test it yourself).

      --
      "First they came for the slanderers and i said nothing."
    12. Re:After 30 years of programming by philip.paradis · · Score: 1

      When referring to the Perl programming language, the correct usage is Perl. Given the fact that you're apparently in a position to make hiring decisions on programmer positions, you would be well advised to be well versed in proper naming conventions. Incidentally, I've been coding in multiple languages, although predominantly in Perl, for twenty years. I'm not looking for a job, though.

      --
      Write failed: Broken pipe
    13. Re:After 30 years of programming by phantomfive · · Score: 1

      I can tell you we just interviewed a guy who was horrible at interviewing. He wasn't very good at interviewing at all, in fact it was one of the worst interviews I'd ever done. Half the time I wasn't even sure what he was saying.

      But we all came away with the idea that he can probably program well, so we hired him anyway. And it turned out he is a good programmer.

      I just tell you this because whatever your weakness in interviewing, there are some companies that will not hire you because of your weaknesses, and others that won't care about them. Apply at companies that don't care.

      --
      "First they came for the slanderers and i said nothing."
    14. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      Any respectable quicksort implementation switches to other algorithms for short arrays. "Pure" quicksort implementations are (hopefully) only found in textbooks.

    15. Re:After 30 years of programming by Jane+Q.+Public · · Score: 1

      Haha. Point taken. Come to think of it, the only language I can recall off-hand that is officially all-capitalized is BASIC, because it's an acronym.

      I was ribbing GP a little. In general, I agree that one should be able to pick up another language without TOO much difficulty. But many people I have spoken to (I have done some Perl but it was only to translate existing code to another language) have found existing programs in Perl to be singularly difficult to decipher. I understand that it is generally due to the flexibility of the language, but "magic" symbols don't help a lot. :)

      And to be clear, I'm not referring to myself above, because the Perl code I worked on was in a very well-defined context and consistently structured. So I'm in no place to criticize it, myself.

    16. Re:After 30 years of programming by philip.paradis · · Score: 1

      Fair enough :). For the record, I've seen some pretty bizarre (read: wtf) stuff done in Python, Java, and certainly C. While I happen to greatly prefer Perl for various tasks, I'm also a big fan of coding to a style guide, whether adopted from an external source or developed internally, regardless of the language being used. I'm with you on context and structure.

      --
      Write failed: Broken pipe
    17. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      I work with some where I doubt infinity will suffice.

    18. Re:After 30 years of programming by Anonymous Coward · · Score: 1

      I am sorry but any experienced programmer should be including time to account for unforeseen issues to do otherwise wreaks of something I would expect from a junior programmer, the more complex or unknown the task the greater you should be increasing the value of your multiplier for expected time to complete. eg. simple task = 2times what you expect it would take if flawlessly down, 3 times if slightly more complex, 4 times if really tough etc. to not be taking task complexity and unforeseen issues into account when making estimates is poor project planning. Overestimating a job and coming in early won't get you in a lot of trouble or cause budget overruns down the track, underestimating is a nightmare for everyone involved and shows poor project planning from the get go as only a moron expects any significant project to have no unforeseen delays.

    19. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      ...the worst NEVER finish because after the 50th revision, the program is still not 100% right and it's not worth the downtime to go through another revision.

    20. Re:After 30 years of programming by ElusiveJoe · · Score: 1

      That's when you double the infinity!

    21. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      I am sorry but any experienced programmer should be including time to account for unforeseen issues

      No project manager will accept that.

      If everything goes as expected, it will take around four days. Best case, it turns out that the feature is already built into the .NET framework, and it will take a couple of minutes. Worst case, it turns out that this is not possible under Windows, and we'd either have to write our own operating system from scratch, unless we can convince management to move everything from Windows to zOS, but doing that will probably take almost as long as writing a new operating system.

      How are estimates for doing new things working out in the physical engineering world? What's the current estimate for a running fusion power plant? Or a space elevator?

      Sure, they can usually give you an estimate for a bridge. But you know what? Building a bridge is a known problem, like creating a hash table. I can estimate creating a hash table easily. About two minutes, less if I already know the type of the key and value.

    22. Re:After 30 years of programming by Nerdfest · · Score: 1

      COBOL as well, because it's an acronym and to help make it more annoying.

    23. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      It doesn't help when management is a worse offender themselves and constantly overpromise deadlines that are optimistic to the point of ridicule. When those same managers have a habit of inventing non-existent requirements mid-process you have a real winner of a project manager. Try giving this person a Scotty estimate of time required and they look at you like you're insane. If asked to demonstrate their insane expectations they will do a shit job of putting on their pants and spend the rest of the project trying to run with their trousers around their ankles.

    24. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      using bubblesort is bad, but if you know you're only sorting 10 items ever, it'll work in a pinch.

      Except that every programmer should know that it never stays at 10 items.

    25. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      Well, it's helpful to have the basic understanding of Big-O and what common algorithms have.

      Having only a basic understanding of big O is counterproductive. There are way too many people that take Big-O as some sort of ultimate truth, completely ignoring the possibly large constant factors and the influence of modern hardware. By big O alone java.util.LinkedList or std::list are fast at inserts/delete, by performance guideliness they loose out unless you have a very specific access pattern on a very (extreemly) large dataset. So no, a basic understanding of Big-O is not usefull at all.

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

    27. Re:After 30 years of programming by geminidomino · · Score: 1

      Haha. Point taken. Come to think of it, the only language I can recall off-hand that is officially all-capitalized is BASIC, because it's an acronym.

      "Practical Reporting and Extraction Language"
      or
      "Pathologically Eclectic Rubbish Lister"

      Yeah, they're backronyms, but still worth mentioning, if only to bring a grin to the other Perl-users in the audience. :)

    28. Re:After 30 years of programming by geminidomino · · Score: 1

      Erg. More coffee...

      $s = "Practical Reporting and Extraction Language";
      $s =~ 's/(Reporting) and (Extraction)/\2 and \1/';

    29. Re:After 30 years of programming by c · · Score: 1

      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.

      This. I find it utterly baffling that in this day and age (and I mean in the last approx 15-20 years when multi-threading support in commercial operating systems has been available, if not quite perfect), there are still computer programmers who have trouble grokking it.

      I was talking to someone about how they were saying the next version of a rather large Java application was going to be a lot faster.

      me: How's that going to happen?

      him: Because they're going to add multi-threading.

      me: Why in the world didn't they make it, a large Java application, multi-threaded in the first place?

      him: They said they were kinda new to Java and multi-threading is really hard to get right.

      me: (once I picked up my jaw) They're about to discover an entirely new level of "really hard"

      --
      Log in or piss off.
    30. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      I think the key thing to remember about data structures and algorithms - in this day and age where we have fast processors and tons of memory at our disposal - we can often times afford to have inefficiencies. The underlying concept there is to avoid 'premature optimization'. I know a lot of programmers who are constantly working to make each algorithm the best it can be, and there have only been a few instances where that is truly needed.

    31. Re:After 30 years of programming by HornWumpus · · Score: 1

      Give them an estimate for producing a detailed estimate and project plan.

      If they are asking for an estimate before you have a detailed project plan they are _setting you up to fail_. The only option you have with such bastards is to double the number and go the next larger unit. (e.g. your guess is 1 week, say 2 months; guess is 2 months, say 4 years.)

      Ask them to tell you the budget before you give them the estimate. They will likely have one, but it will have been pulled from a dark place.

      More often then not what would serve them best, would be telling them what parts of what they want is doable on their budget. But they won't want to hear that.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    32. Re:After 30 years of programming by HornWumpus · · Score: 1

      Wait till you have a manager/marketer who tells the clients to ask for insanely short deadlines. Thinks it makes the programmers work harder. Then the client tells the staff and nobody ever pays any attention to deadlines that came from or via shithead. Then I tell shithead why we're ignoring his dumb ass to his face.

      Then he gets upset, claims the clients are lying. Goes crying to the company president.

      Then I quit, president should have fired his ass, same as he would have fired a programmer caught in a material lie.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    33. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      The worst offenders take double the amount of time they say they will.

      You're optimistic!

      My college asked me yesterday when a program will be finished, I answered in the afternoon, more likely 14h than 17h.
      At 17h20 I mailed to inform him I won't make it by 14h, that I'm going home and I'll finish it in the morning. Tomorrow morning I'll bring him the happy news that I've finished it.

    34. Re:After 30 years of programming by peter303 · · Score: 1

      "The worst offenders take double the amount of time they say they will."

      Thats why when I was a consultant I often doubled my best time estimates. And employers loved me if I came in under estimate.
      Old trick from Scotty of Star trek.

    35. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      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.

      Wouldn't that make it linearly slower?

    36. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      Overestimating a job and coming in early won't get you in a lot of trouble or cause budget overruns down the track

      When you overestimate, there will be no coming in early, because the job will be given to someone else.

    37. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      Use RAND's 3-point estimation

      I myself use 1-point rand(), highly recommend it.

    38. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      Pulling a number out of thin air clearly doesn't work.

      But of course. One pulls a number out of where air is thickest.

    39. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      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.

      I always finish ahead of time because whenever some dumbass manager asks me how long it will take I give them an estimate that assumes I will only work on Tuesdays.

    40. Re:After 30 years of programming by BreakBad · · Score: 1

      +1 This is exactly how I feel. Great advice. Now to convince management.....

    41. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      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.

      Initial estimates are often quarter of the actual amount. There is a reason the building industry, for example, is using statistical averages over the construction space. Software industry doesn't have a similar metrics available.
        Dealing with people and early identification of problems with the communication patterns is one of the missing necessary skills in the list, in my opinion.

    42. Re:After 30 years of programming by mrprogrammerman · · Score: 1

      From a corporate perspective, programming is about being able to take some set of vague requirements and create a software solution to solve a business need in a reasonable time period while giving enough feedback to management and minimizing business risk.

    43. Re:After 30 years of programming by peccary · · Score: 1

      A big reason why estimates tend to be low is that when you make your best estimate, then you add 100% buffer for "all the little problems", your management insists that you must be goldbricking and surely that's not a reasonable estimate. So you learn to make your estimates "what you think your management will accept without busting your balls over", and then about half the time they're too low.

    44. Re:After 30 years of programming by Anonymous Coward · · Score: 0

      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.

      In other words, concurrency is a god awful nightmare on anything resembling Unix (posix).

    45. Re:After 30 years of programming by wwfarch · · Score: 1

      My problem is getting people to listen to my estimates instead of revolting when they hear something they don't like. I typically don't need to estimate long projects so my estimates are typically on the order of days or weeks. As a result I can usually spit ball my estimates pretty accurately off the top of my head. A recent example was a project that I said would take two weeks. My boss balked and said "Why will it take so long? I'll put down one week". Sure enough, the project took 2 weeks.

  13. A Lost Art? by Anonymous Coward · · Score: 0

    Clean Coding

  14. 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 Anonymous Coward · · Score: 0

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

      Who uses JSON and YAML outside web development? Your little niche is not the whole world, and a person smart enough to be a real programmer doing web work is a sad waste of a great mind on a problem better suited for stupid people.

    2. 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
    3. Re:XML? Really? by Anonymous Coward · · Score: 0

      Dear god yes, this a trillion times.

      XML is the most pretentious wankery of a language I have ever seen.
      XHTML is 10x that. I am glad that branch of webdev died in favor of HTML5, if it never XHTML5 would have never bloody come out.

      Hell, tab-delimited and comma-delimited lists are better than XML is!
      Even stick in something stupid like . Who the hell uses besides Toady for Dwarf Fortress? Exactly, a -delimited list, fund it.
      And use ¦ since it has fallen out of most uses, and large dash if you will never deal with them, — / - huge difference between the two, I can't even remember what that dash was for again, but I assigned it to alt+- key combo anyway because of this. (likewise ctrl+- for –, thinking of changing these since it is used too frequently in programs)
      Anything with a large-ish noticeable separation between items in the list is far better than just popping in a billion duplicates of the same damn thing everywhere.
      I'd rather have something that is by design small instead of having to enable compression and hope the webserver using it supports it.

      XML needs to die.
      Just like PHP does. PHP is the next worst, probably the worst of the scripting languages.
      Remember the whole "right tools from the toolbox" metaphor for languages?
      PHP is your sandwich. PHP is like hammering a nail with a sandwich. It is also a sandwich which has been sitting below some tools for months now, rotting away, decomposing.

    4. Re:XML? Really? by HornWumpus · · Score: 1

      XML is not a language.

      XML is a data structure. It's not great, but it's done, and most programmers are familiar enough. Better then reimplementing something similar, yet again.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    5. Re:XML? Really? by Anonymous Coward · · Score: 0

      XML is great for customizing a markup language.

      XML sucks when it is used for config files.

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

    2. Re:Don't ask me how I know this by Anonymous Coward · · Score: 0

      A good tip I picked up: make your prototypes black and white. That way, management will be easier convinced it's not yet done.""No, let's not call in the designers yet, we're still tinkering and it would be a waste to polish something that's going to be replaced.".

      Then again, Visual Studio Black & White Edition.

  16. 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
    1. Re:the most basic data structures by techno-vampire · · Score: 1

      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, 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 going to be working with from one run to another and it's not exactly hard to add to your toolkit.

      --
      Good, inexpensive web hosting
    2. Re:the most basic data structures by Jane+Q.+Public · · Score: 1

      "There is nothing basic about these."

      Correct. I wondered about that myself. Those are important but hardly basic.

      A stack is a basic structure, as you say. A string is a basic structure, with several different but classic storage schemes. (Please don't start in with "That's a data type, not a structure." Nonsense. They're all structures.)

      Integers are basic. As are longints, etc. They may vary from platform to platform, but they're still pretty basic. As is the byte, for example. The meaning of that has changed over the years (now meaning just 8 bits, period... it used to be variable depending on the architecture), but it's pretty basic and quite important.

      Arrays are basic.

      Hash tables are not "basic". In fact that used to be a rather lengthy section of basic CS classes; how to implement an efficient hash table in code. There is nothing even remotely basic about them; the data and underlying code of the class are quite complex compared to truly basic structures. Some modern languages just make them SEEM simple. But I know few coders today who could actually build a good one from really basic components.

      Saying that a hash table is a basic data structure is like saying Quicksort is a native operator.

    3. Re:the most basic data structures by K.+S.+Kyosuke · · Score: 1

      An important basic data structure? Try a stack.

      Use a Forth, Luke! ;-)

      --
      Ezekiel 23:20
    4. Re:the most basic data structures by martin-boundary · · Score: 1

      (Please don't start in with "That's a data type, not a structure." Nonsense. They're all structures.)

      Well, 50 years ago I would have agreed, but we're no longer in the Bourbaki era, and I'm afraid structures have mostly given way to categories... Oh, sorry, wrong subject ;-)

      Hash tables are not "basic". [...]

      In some sense they are, if you consider randomness as a basic concept. However, I think you're blurring the line between a dictionary (which is the basic structure) and a hash table (which is only one concrete implementation of a dictionary).

    5. Re:the most basic data structures by gnasher719 · · Score: 1

      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 going to be working with from one run to another and it's not exactly hard to add to your toolkit.

      A linked list is not an abstraction layer, it's an implementation detail. And today I would say that situations were a linked list is optimal are quite rare. Intrusive linked lists (linked lists where the link is part of the object) are something that I would avoid if at all possible.

      Just looking at Objective-C: There is no "linked list" container class. There's array, dictionary, set, multi-set, indexed set, but no linked list. How come?

    6. Re:the most basic data structures by Anonymous Coward · · Score: 0

      Yet that feature prevades essentially all ISAs from the 4004 to every one of our contemporary billion transistor CPUs.

      Point of order: 32-bit ARM code doesn't even have stack instructions, and that ISA goes back to 1988. GPU ISAs don't have stacks either. x86 likes to stack things when exceptions fire but most modern ISAs leave that up to the programmer, or provide shadow register sets. The programmer will more often than not use a stack, of course, but that's a programming feature and can't really be said to pervade any ISA. Modern ISAs provide large numbers of registers specifically to avoid stack usage, because it's better to keep state on-chip for both instruction re-ordering, speculative execution, and simple bandwidth and L1/L2 usage limitation.

      Stacks are a software things, not a (modern) hardware thing. And you go too far down that road, suddenly you're teaching FORTH.

    7. Re:the most basic data structures by Anonymous Coward · · Score: 0

      Linked lists are the way to go.

      Pretty much anything in AmigaOS is a subclass of the node structure for linked lists.
      Processes, libraries, drivers, interprocess messages, input events, interrupt handlers, GUI windows, pretty much all of it.

      Once you have linked lists you can solve a lot of strange resource management problems, even if it isn't always in the most efficient way possible.

    8. Re:the most basic data structures by khallow · · Score: 1

      Hash tables are not "basic".

      Yet, they're fundamental to a lot of manual sorting tasks we do all the time. For example, sorting playing cards - a common approach is to sort by suit (hash table), then by number. Similar, if you had to manually sort a ton of job applications (or other documents) in alphabetical order, it'd go a lot faster if you hashed by first letter of their last name first, putting all the applications that start with "A" in one pile, those with "B" in a second, and so on.

      The full theory is complicated, but a lot of people create simple hash tables and such without realizing it.

      I disagree that something can't be considered basic just because some aspect of it is extremely complicated. That's like saying that writing a problem that ends isn't basic because of the stopping time problem.

      I'd include basic concepts of discrete math, combinatorics, and graph theory even though these rapidly grow into deeper, far more complex problems.

    9. Re:the most basic data structures by Misagon · · Score: 1

      The important thing is not to know the structures and algorithms, but to know about them: understand what drawbacks and benefits they have in each circumstance so that you choose how to best select which one to use and how to best use them.

      When it comes down to using one of them, you will most often use a highly optimized version from a library. But no matter how fast or how memory-efficient a specific implementation is, the fundamental properties of the algorithm remain.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    10. Re:the most basic data structures by SpaceLifeForm · · Score: 1

      And linked-lists.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    11. Re:the most basic data structures by adonoman · · Score: 1

      I've interviewed for a company that required you to write out a stack implementation in C++ from scratch during the interview. It's a great problem, since it's quite easy to define, nearly everyone knows what is required, but it's complicated enough that when coding by hand on paper, every entry-level programmer is going to make a mistake, and you can see how they think when you tell them there's a mistake. Even when they get it right, you get a lot of insight into their problem-solving style by listening to them defend the design.

    12. Re:the most basic data structures by TopSpin · · Score: 1

      Point of order: 32-bit ARM code doesn't even have stack instructions

      ARM's generalization of the classic PUSH and POP instructions has always been admirable (at least until they made THUMB which sadly does have these foul instructions,) but the real world uses STMDB (store multiple decrement before) and LDMIA (load multiple increment after) to implement stacks, which is exactly why these instructions exist. 32-bit ARM provides a stack pointer (R13 a.k.a SP as per ARM) and a return address (R14) register. This not merely software convention either; these registers are banked to allow distinct values for these specific registers across processor modes to accommodate the classic call stack in the face of exceptions.

      32 bit ARM is every bit as "stack oriented" as anything that has explicit PUSH and POP instructions. There is no pretending otherwise.

      Modern ISAs provide large numbers of registers specifically to avoid stack usage

      Modern ISAs? Providing a large register file to avoid memory accesses goes back to Berkeley RISC-I (the inspiration for ARM, incidentally) at least. However, what you have then when executing real programs is merely a very limited stack inside the register file. From RISC I: A REDUCED INSTRUCTION SET VLSI COMPUTER:

      Our approach is to break the set of window registers (r10 to r31) into three parts (Figure 7). Registers 26 through 31 (HIGH) contain parameters passed from “above” the current procedure; that is, the calling procedure. Registers 16 through 25 (LOCAL) are used for the local scalar storage exactly as described previously. Registers 10 through 15 (LOW) are used for local storage and for parameters passed to the procedure “below” the current procedure (the called procedure). On each procedure CALL a new set of registers, r10 to r31, is allocated; however, we want the LOW registers of the “caller” to become the HIGH registers of the “callee.” This is accomplished by having the hardware overlap the LOW registers of the calling frame with the HIGH registers of the called fmme: thus. without moving information, parameters in mgisters 10 through 15 appear in registers 25 through 31 in the called frame.

      What we have here is a hardware accelerated stack based on a large banked register file. An optimization.

      Stacks are a software things

      If that's true it aligns pretty nicely with Genuinely Useful Ideas In Programming then, no?

      And you go too far down that road, suddenly you're teaching FORTH.

      Or the JVM instruction set, for something a tiny bit more relevant.

      --
      Lurking at the bottom of the gravity well, getting old
  17. Stuff you should learn by Anonymous Coward · · Score: 1

    Learn an assembly language. Program hardware. Learn what goes under the hood.

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

    2. Re:Stuff you should learn by Anonymous Coward · · Score: 0

      Learn C. It's like a portable assembly language.

    3. Re:Stuff you should learn by Therad · · Score: 1

      It could be changed to "Learn the underlying structure". For example if you program in .net, how does .net execute your code?

      Also, learn the overlying structure. Who will use my code, is it another programmer, a customer or another program? How will they use it? How can I simplify their process?

    4. Re:Stuff you should learn by Anonymous Coward · · Score: 0

      Absurd. A computer is still a computer. Modern programming is exactly like old times programming: writing instructions that modify input to generate output. You will be lost in the forest of miraculous paradigms if you forget the basics and ignore the building blocs of computation.

      Learning assembler and hardware is a wonderful way to discover that there's nothing magic in any modern language, and that each feature includes a price to be paid.

    5. 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
    6. Re:Stuff you should learn by Anonymous Coward · · Score: 0

      And that's how you end up with Firefox and Java.

    7. Re:Stuff you should learn by Kielistic · · Score: 1

      It could be changed to "Learn the underlying structure". For example if you program in .net, how does .net execute your code?

      Programming assembly languages and hardware will not teach you how .NET is executed. If you learnt the intricacies of .NET/C# execution path, virtual machine or optimizations you are almost certainly now out of the pay-grade of a .NET developer.

      Modern high level compilers are very complicated and beyond "cursory" understanding. They are a specialisation. Understanding their basics is not a harmful skill but it will not help you optimise your code in any meaningful sense in a high level environment.

    8. Re:Stuff you should learn by c · · Score: 1

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

      I'd say that the ability to think at least a couple levels deeper than the abstraction provided by the interface you're using is critical. You may not have to think down to the machine level, and you almost certainly can't outthink the compiler (although you will learn a lot about efficiency using a non-optimizing C compiler), but you should have at least a sense of what things are hard or easy for a given language/system, how those things go wrong, how to diagnose failures, and how to fix them. That, in my opinion, is one of the most fundamental differences between actually programming versus just operating a computer, and that's something you can really only get from grasping how things work under the hood.

      --
      Log in or piss off.
    9. Re:Stuff you should learn by internerdj · · Score: 1

      I wouldn't disagree except the lion's share of expended effort for most students in assembly language is not the foundational concepts of piecing together higher level concepts but struggling with barely legible syntax and only slightly more legible error outputs. Maybe we just had poor choices for assembly processors but the things that were important from that course came through clearer in the microprocessor course.

    10. Re:Stuff you should learn by muridae · · Score: 1

      Knowing how the CPU works can be a big help. I've seen coders who don't know how a floating point value or operation take place; which leads to them not knowing why adding 1,234,567,891,011.12 to 0.01 can end up different if you reverse the order of the values. It leads to not knowing why 127+1 rolls over to -0 instead of -1 on certain architecture. And it leads to not knowing why a pointer works, even if the pointer is abstracted behind a language that is effectively interpreted into C before being compiled to object code. Or what jobs the compiler and linker are actually doing, should the language of choice require them.

      And with so much effort going into embedded systems, you can write your code in what ever high level language you choose, but you better understand the underlying architecture. And learning something simple (MIPS 1 or the Acorn RISC machine ARM2), and early, can let you pick up the harder stuff later while understanding the concepts that you just couldn't manage without.

    11. Re:Stuff you should learn by Anrego · · Score: 1

      I think you can pick up most of that knowledge from c. For that matter, c may become the new bar for practical low level knowledge.

      As to embedded stuff, I imagine compilers are going to continue to get better and better at taking what the programmer wants to do and turning it into it's most efficient form. Languages will keep getting higher and higher level, and toolkits will continue to abstract more away from the user. We're already at a point where in many languages, all you need to know about a datatype is whether it's a number or a string. The tools figure out the best way to store and manipulate the underlying data.

      We'll always need people who can explain whats happening down to where transistors are firing, but most programming jobs of the future are going to building on existing components using toolsets that hide most of the actual gory complexity. I think we're already at a point where you can be a good programmer without any knowledge below say, the java runtime environment. In other words, I'd put low level knowledge as a nice to have vice essential knowledge every programmer needs.

    12. Re:Stuff you should learn by muridae · · Score: 1

      Since the article was about useful ideas, I think knowing a simple assembly language is still a good thing to pick up. It doesn't have to run in anything other than an emulator that even allows for non-standard instructions like 'print out what's in register X' so you can tinker. C doesn't expose all the flaws that show up at the embedded level, because the compiler can hide them away behind the base libraries. The transistor level I leave for computer engineers instead of programmers; it's useful to know about pipelines, and if you are doing embedded programming you need to know how many instructions deep and how the jump prediction works, but you don't need to worry about the electron propagation like the engineers do.

      And I disagree that all programming is being done at a high level now. Look at the way people build modchips for consoles, break HDCP encryption, and even the console designers who have to put together the OS and all the embedded programmers who are adding drivers for graphics chip X or radio chip Y to the latest Android/Windows/iOS device. They are programmers, the banking DBA who throws together a system where your account balance is a floating point and chucks that to a webpage isn't - in my book. You could be a good programmer without understanding things below the JRE, or you might not be. It'd be hard to tell, and it would vary so wildly from the coder who just knows how to glue together other libraries without checking that the functions returned a non-error value to the one who understand enough to know what's going on below the JRE level but just hasn't learned it yet.

  18. Er by Anonymous Coward · · Score: 0

    OP sounds like something a cis major would go on about to impress people. And asking implies you think we're "master programmers", and are really asking our opinion while playing on hubris.

    But for the sake of pretending, I'd first breifly explain the turing machine, that it can calculate any possible computer program, then introduce them to python. After that, they can explore to fill in the gaps. No one likes to be lectured, especially not new programmers.

  19. Reasonable list by Anonymous Coward · · Score: 0

    Some stuff I would probably add:

    Basic understanding of caching/Virtual memory and the concept of temporal and spatial locality
    Ability to write/read simple examples of RISC-style assembly (MIPS, etc.), in order to understand what exactly it is that a compiler outputs
    Passing by reference vs. Passing by value.

  20. On a par with those others, I think... by Empiric · · Score: 1

    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 to efficiently deal with software functionality as a "black box" for which the developer need not know all the particulars of implementation, allows for the allocation of mental resources to the particular requirements of the task at hand. Being able to use others' code in this manner, and write code in this manner, is to my mind a crucial ability to contribute to an actual professional development team.

    --
    ~ Whence do you come, slayer of men, or where are you going, conqueror of space?
  21. Uncontroversial? by Urkki · · Score: 1

    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 using network and databases, and development for different mobile devices, while also embracing the functional aspect of JavaScript (for QML and HTML), you should be pretty well set for everything on every platform ;-)

    1. Re:Uncontroversial? by Marillion · · Score: 1

      The GUI is not useful. Well, okay, it has its moments. I've seen too many programmers go from mouse to keyboard so often and so frequently that they can skip the gym from the cardio workout it provides.

      --
      This is a boring sig
    2. Re:Uncontroversial? by muridae · · Score: 1

      That being said, if you master every aspect of Qt5 including QML and using network and databases, and development for different mobile devices, while also embracing the functional aspect of JavaScript (for QML and HTML), you should be pretty well set for everything on every platform ;-)

      Except embedded systems with multiple parallel data buses between different architecture chips, like an average handheld game device or a phone. You could flounder, trying to get Qt5 to run on it or any other library of your choice when the OS hasn't been finished yet. But you'd probably end up with something that barely runs and at a pace that makes snails stop and feel pity. And sometimes building those libraries from scratch is the job, and if you are used to using something as big at Qt to handle stuff for you, you might not be able to manage the tasks that it obfuscates.

    3. Re:Uncontroversial? by Urkki · · Score: 1

      I didn't mean you'd use Qt on everything, I meant you're pretty well prepared for everything if you know all that. It was tongue-in-cheek too, because it's such a blanket statement, same could be said about .NET or JVM worlds.

      Of course the statement isn't completely true either, all these don't help much with VHDL, for example (or maybe writing GPU shader code helps with that, not sure).

    4. Re:Uncontroversial? by muridae · · Score: 1

      VHDL is . . . writing a document to generate a circuit board, IMO. Really, you should be able to take most VHDL that use common components (4xxx CMOS or 74xx TTL) and get the output as a schematic. It may be that FPGA and other VHDL-targets are cheaper and more well stocked with the obsurca of devices (DAC, ADC, timer and PLL timer mux or dividers, and so on) than a cabnet full of hard epoxy ang glass and copper IC components, but a bus is just a wire on a breadboard or a trace on a circuit board. Granted, the VHDL to schematic won't add and do the routing to get equal length traces (without compiler support, I would expect), or place the needed chokes and caps to maintain a good power supply or audio (no VHDL targets I've used required me to think about those parts), or know which diode to use to drop anything over 0.8v to 0.6 (audio 1v to -1v AC for audio distortion) but you could hook up with a parts library and get all the parts you'd need.

      I suppose thinking like a VHDL writer does make doing shaders easier, since it's all parallel operations. But shaders are image processing for the most part. Or obfuscating a problem to look like image processing (assuming you aren't using shaders as part of OpenCL or something and your code is actually the normal code just compiled into shader functions...the compiler and library doing to obfuscating for you). Going the other way, from shaders to VHDL, you'd still need to know the hardware parts and how to make your code do very simple steps. Or maybe that's Verilog, I get the two syntaxes confused all the time.

    5. Re:Uncontroversial? by muridae · · Score: 1

      As for using Qt on an embedded system, I didn't think you were serious about it. But I've met people who don't look at the specs and think that any library should compile right and do what it's told on any target architecture. So a master of Qt might have a hard time getting the underlying stuff (like the OS, the graphics driver, X.org!) going before moving on to actually running. Worse, think that since their target is an AVR, gcc-avr will be able to tell what syscalls are needed to talk to the other connected devices.

      I don't mean to bring down anyone who works at that high level, UI stuff is beyond me for the most part. But it's great fun to sit down with a compiler and write some simple C99 targeting both the ARM9 and ARM7 codes of a Nintendo DS. The homebrew world is pretty good about getting very simple libraries that just do one target thing, but gluing a bunch together isn't always all that good either. Specific to the DS, in 2 screen mode the ARM7 is the chip that has to talk to the audio chip, the ARM9 can just send it signals on what it wants done, while the 7 has to get coded to do that. So a demo might use the 9 to do most of the work, and call a playNote(freq, duration, ...) that the 7 runs and passes to the audio. But if you don't know the wireing, and try to run your audio straight from the 9, nothing works. If you write all your code in the 9 and then pass each individual unstruction as setDACfreq(freq) and setDACduration(duration) and then play(), you've just locked the 9 and the 7 cores up for 3 function calls instead of 1, and the available cycles to draw, compute AI and game engine stuff, will be delayed for 3 times as long. The first take the 9 one function, the 7 a single response and passing that along to the audio chip (inline function? or a simple movement of all music the the 7's memory and the 9 just sending a playNow(songArrayName) that doesn't wait for a return, and then both can do back to doing other parts of the demo, while the 7 waits for the timer interrupt to say 'next note now'. And the graphics calls on that system . . . sheesh! The early libraries were mostly text and interface reads.

      To do that at the high level only, without going into the lower details, requires a big library that might not exist on your target yet. So a new coder can wait, and the good coder can at least piece together a hacked up library while they wait for the great embedded gods to create a really good library or OS. Personally, I'm not that patient to go through all the spec sheets and testing bus lines, but am comfortable piecing together a hacked up library to do what I need to get done. I'm not going to write the first 'print text to screen' library, but from that and someone else doing the probing and explaining it in simple detail (this chip uses syscall2 to do...) I can cobble together what I need to get my projects underway. I know, that requires a library of sorts to get those syscalls out to the programmer and the compiler to have the right target abilities; all the levels above that is where I'm comfortable with my code. But that knowledge of the caveats and gotchas that pop up and are usually in the original documentation from the folks doing that first gcc port, and knowing how to apply what those docs mean when they reference the buses and chip capabilities and flaws is an important skill.
      Something that many "glue together libraries and other peoples demo code" coders I know don't do. They tend to be so agnostic to the hardware that I've seen (C++ time now) a pointer set by a call to new() that wasn't in the initializer of the class but in a private function called when the object appears in view (and doesn't check that it wasn't already initialized) and then also failed to check that new returned a non-null value before dereferencing it. And finally ends with delete() in the destructor and finishes with setting the pointers to 0 (architecture dependency again, 0 isn't always null, and it isn't always memory location 0x0 either, but it was in the destructor

  22. Impossible by goodmanj · · Score: 0

    Any discipline that can list its core ideas in a short Slashdot post isn't worth studying.

  23. You mean basic stuff? by NotSoHeavyD3 · · Score: 1

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

    --
    Did you know 80 to 90% of the moderators on slashdot wouldn't recognize a troll even if one dragged them under a bridge.
    1. 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.

    2. Re:You mean basic stuff? by narcc · · Score: 1

      You think that's bad? I saw a guy once who thought that the length of a function should be determined by the size of the screen!

    3. Re:You mean basic stuff? by Belial6 · · Score: 1

      I had to correct one of those copy and past problems just this week because of a contractor the company brought in for a 3 month stint to "help get us caught up".

    4. Re:You mean basic stuff? by maxwell+demon · · Score: 1

      You can save a lot of screen space by omitting comments. That way you can write more complex code without violating that rule. ;-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    5. Re:You mean basic stuff? by Anonymous Coward · · Score: 0

      >For example, my record is almost 5,500 lines

      your "record"? you're actually proud of this?

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

      you're an idiot.

      heres one good reason for you

      TESTING.

      go lookup TDD.

      go lookup refactoring.

    6. Re:You mean basic stuff? by Anonymous Coward · · Score: 1

      Your claim that there is no way to decompose this function is laughable. A simple class transformation can do this (local variables become member variables, case statements become member functions, switch statement becomes a pointer-to-member function lookup and call).

      As for a 1200-line data structure, you are claiming there is no way to group these elements into substructures at all? Really?

      What you are describing is casebook unmaintainable spaghetti code. The problem here is clearly that you're not familiar with the refactoring methods that can help you. I'm not surprised - this monster has grown so large, any refactor is probably a nightmare. I bet there are no unit tests to help you validate refactoring steps either?

      Fair enough, this happens, but don't pretend this is how great programmers operate. No great programmer would have let it go this far in the first place.

    7. Re:You mean basic stuff? by mcvos · · Score: 1

      To me, a switch statement is the one exception where a function is allowed to be long. The basic rule to me is: the function should do only one thing. If it's more, split it up. A switch is a single thing that can take up a lot of lines, but the function should only have that switch, and each case should be short, simple and concise, or it should call a function that does the actual work for that case.

      Basically, you'd need a switch with over a thousand cases to end up at 5500 lines.

    8. Re:You mean basic stuff? by mcvos · · Score: 1

      Use a smaller font.

    9. Re:You mean basic stuff? by hibiki_r · · Score: 1

      You spout a lot of BS, but instead of wasting an hour, I'll just go against one piece:

      If adding functions adds execution overhead, you are not working with a good enough compiler.

    10. Re:You mean basic stuff? by DutchUncle · · Score: 1

      Parsing codes is always the killer on this subject. I agree completely with the general rule that shorter routines are easier to understand and validate. However, consider a Modbus or CANopen parser that's getting the data referenced by register number; it's one huge switch in which 98% of the cases are single-line "return structure.field;", but there are a *lot* of such single lines, and making each of those single lines a separate function (as the purists would have it) does nothing to help either complexity or comprehensibility.

    11. Re:You mean basic stuff? by internerdj · · Score: 1

      Think that is bad? I had a professor that docked points in a graduate level class for my code overflowing the line on his printouts from my electronic submission. HTH can someone help that?

    12. Re:You mean basic stuff? by swillden · · Score: 1

      Basically, you'd need a switch with over a thousand cases to end up at 5500 lines.

      If you have that many cases, you shouldn't implement them as a switch. A hashtable of function pointers, or functor objects, or command pattern instances, or similar, depending on your language and context.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    13. Re:You mean basic stuff? by mcvos · · Score: 1

      If you have that many cases, you shouldn't implement them as a switch. A hashtable of function pointers, or functor objects, or command pattern instances, or similar, depending on your language and context.

      I'm not too familiar with the implementation details, but isn't a switch statement basically a lightweight hash table without the hashing? (since everything is already an int)

    14. Re:You mean basic stuff? by swillden · · Score: 1

      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.

      There is no such concept, because that would imply that it's a concept that is simultaneously complex enough to require 5000 lines of code and yet simple enough to be fully grasped, in all its details, as a unit by the human brain. That's a contradiction.

      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.

      I disagree that would make it harder to follow the flow. Moving the relationship between the tokens and the bits of code to a map or other initialization structure would make it easier to modify and maintain.

      Also, how do you write unit tests for that function? How would you write unit tests if all of the cases were functions that you could test individually? Keep in mind that proper test coverage should address every possible path, not just every line of code.

      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.

      Execution overhead? Have you looked at what your compiler produces for a big switch like that? It almost certainly produces exactly that structure: A hashtable lookup of a function pointer. Or did you think that finding the right branch was free? As for having to pass piles of flags around, it seems to me that you have another structural problem. Remember that local state is just as evil as global state if the scope of the local state is large.

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

      This sounds like yet another structural problem in dire need of refactoring. The need for so many comments is a strong clue that the code is not sufficiently clear. Decomposing the large data structure into smaller ones would provide lots of opportunities for using well-chosen names to avoid the need for explanatory text... and nearly always has the benefit of making the client code (code that uses the data structure) more readable and maintainable as well.

      In short, those sorts of rules simply don't make sense once the problem you're trying to solve becomes sufficiently complex.

      This is not true, but the reason it's not true is subtle and important.

      What you're saying is that the problem you're solving is complex, so the solution is complex. This means that the next programmer that comes along is not going to be able to work effectively on the code until he or she fully groks the entire problem and solution. This implies one of two things:

      1. The problem is inherently complex; or

      2. You have not worked hard enough at finding a way to decompose the problem into more tractable sub-problems.

      In my experience, it's almost always case 2. And if the problem can be decomposed then there are large and obvious benefits, even if doing the decomposition makes the initial work take five times as long, because maintenance consumes a lot more hours than initial development, and because bug counts will be lower, partly because it's easier to grok in pieces, but mostly because a complex solution is untestable.

      Reading your comment, I imagine you debugging problems by stepping through the code as you run it on various inputs. If that's the case, it's a recipe for many deep and hard-to-find bugs that hang ar

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    15. Re:You mean basic stuff? by Anonymous Coward · · Score: 0

      Try gzipping the code to save space!

      How about Chinese variable names? One character is a whole word.

      Whitespace is another big space-waster.

    16. Re:You mean basic stuff? by swillden · · Score: 1

      If you have that many cases, you shouldn't implement them as a switch. A hashtable of function pointers, or functor objects, or command pattern instances, or similar, depending on your language and context.

      I'm not too familiar with the implementation details, but isn't a switch statement basically a lightweight hash table without the hashing? (since everything is already an int)

      Yes, the compiler is going to turn the switch into a function pointer lookup table. The reason for doing this yourself is to decompose the cases into small, understandable and testable functions, plus to make it easier to add and remove them. From a performance perspective there will be very little (if any) difference.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    17. Re:You mean basic stuff? by mcvos · · Score: 1

      Good point. Thanks. I learned something new today.

    18. Re:You mean basic stuff? by Anonymous Coward · · Score: 0

      I'm curious to hear your opinion on unit testing, as unit testing a 5500 line function with 100% coverage is difficult. I have worked in legacy code bases with large switch statements like that, and while they're maintainable as long as you have the original developer(s) maintaining them, they lead to code rot extremely quickly. Passing around "piles of flags" for state means you don't have the right data structures set up. Similarly data members that require 15 lines of comments to explain. They require 15 seconds to modify, and the next dev through that code will at some point forget to update the comment. The way to shrink a data structure that size is to group similar fields together. The definition of similar is difficult, but in my experience, if you have > 50 programmers working on your code, those "unnecessary" layers of abstraction can save you down the road ...

    19. Re:You mean basic stuff? by PJ6 · · Score: 1

      Careful about letting opinionation stifle your growth as a programmer. I would Rx you Project Euler. Take particular time to compare the solutions posted by others that are very short (excluding R/K/J) to the ones that are longer. Use a critical eye for not only execution speed, but readability.

    20. Re:You mean basic stuff? by Anonymous Coward · · Score: 0

      if your function is 5000 lines of code you are bad at software design. Period.
        You might be good at algorithm design, you might know every trick in perl, you might read assembly faster than I read python, but you SUCK at designing application and I hope i'll nerver have to work with you.

        5000 linesof code, in whatever language is NOT doing ONE THING and ONE THING ONLY. therefore it ain't a fucking fonction.

      It is not about some stupid arbitraty metric that no function should ever be over 17 lines. It is about making functions that behave as function : take an input, give an output and don't mess with a thousand things in between.

      Just out of curiosity what did you name your 5,500 lines function ? everything_i_need_to_do_and then_tons_of_other_shit( [insert a thousand parameters]) ??

        Names matter. if you can't come up with a reasonnable name for a function or a variable, chances are your design sucks balls.

      Ther are 3 categories of code : librairy code, configuration code and bad code

      Yours is in the third.

  24. 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..."
    1. Re:FUDD'S FIRST LAW OF OPPOSITION by Jane+Q.+Public · · Score: 1

      "It goes in, it must come out"

      ... is actually Teslacle's Deviant to Fudd's Law, with an "L". But hey... could be a typo.

      ---
      "Close B clothes mode on Deputy Dan."

    2. Re: FUDD'S FIRST LAW OF OPPOSITION by Anonymous Coward · · Score: 0

      You'd better hope that your testicle comes back out on its own.

    3. Re:FUDD'S FIRST LAW OF OPPOSITION by Anonymous Coward · · Score: 0

      ... is actually Testicle's Deviant to Spudd's Law, with an "L".

      There, FTFY.

  25. quicksort better than OOP? by phantomfive · · Score: 1

    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.

    --
    "First they came for the slanderers and i said nothing."
    1. Re:quicksort better than OOP? by Anonymous Coward · · Score: 0

      Quicksort is a prototypical example of recursion. Recursion is one of the key things every programmer should understand.

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

      Yeah, it is.

      Quicksort is an important algorythm. OOP is primarily marketing nonsense.

      the concepts you learn with OOP are a whole lot useful than the concepts behind quicksort

      Total bullshit.

    3. Re:quicksort better than OOP? by Anonymous Coward · · Score: 0

      Quicksort important? OOP marketing nonsense?

      Programmed professionally anytime in the last 20 years?

    4. Re:quicksort better than OOP? by phantomfive · · Score: 1
      When was the last time you wrote a quicksort? Because I never have, and I've worked in a lot of different environments, on a lot of different projects.

      "OOP is an exceptionally bad idea which could only have originated in California" — Edsger Dijkstra

      Oh, I see. You're one of those people who can't see anything good about OOP. Too bad.

      --
      "First they came for the slanderers and i said nothing."
    5. 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.

    6. Re:quicksort better than OOP? by Anonymous Coward · · Score: 0

      Quicksort is a nice example of a recursive algorithm. OOP is a concept that makes programming slow, painful and very hard to do right.

    7. Re:quicksort better than OOP? by dave420 · · Score: 1

      If you can't see the benefits, you're already lost to this world.

    8. Re:quicksort better than OOP? by narcc · · Score: 1

      People say that, but they never list the alleged benefits.

      Give it a try. You'll fail, of course, but you'll ultimately find the exercise enlightening.

    9. Re:quicksort better than OOP? by Kielistic · · Score: 1

      Maybe you should give some reasons why it is so bad all the while it is being used quite successfully in many places. That way the rest of us can have a nice laugh at you.

    10. Re:quicksort better than OOP? by phantomfive · · Score: 1

      The unique thing is the idea of functions moving around with the data it operates on. That's basically it.

      The thing I like about OOP languages is a syntax that makes it easy to learn about modularity. Of course you can write flexible C or assembly, and I do, but it's easier to learn the principles when you are using an OOP.

      --
      "First they came for the slanderers and i said nothing."
    11. Re:quicksort better than OOP? by narcc · · Score: 1

      So what you like are objects, not necessarily OOP (by whatever definition). Objects, used appropriately, can be useful. They're no panacea, of course, and their should be little doubt that they're misused more often than not.

      makes it easy to learn about modularity.

      I can't possibly disagree more here. OOP (in the Liskov sense) is anti-modular by its very nature. Languages like Java and C# make it much more difficult for beginners to learn about modularity as a result.

    12. Re:quicksort better than OOP? by phantomfive · · Score: 1

      So what you like are objects, not necessarily OOP (by whatever definition).

      Is that what I said? Please learn to read.

      I can't possibly disagree more here. OOP (in the Liskov sense) is anti-modular by its very nature. Languages like Java and C# make it much more difficult for beginners to learn about modularity as a result.

      Well, you are wrong. The Liskov substitution principle is almost a necessity for truly flexible code. The Alan Kay style of OOP is much nicer in my opinion, but she got that principle right.

      I say that OOP makes it easier to learn about modularity because I've seen it. I used to agree with you completely, because I'd seen a lot of people, some of them good programmers, struggling to learn C++ or Java. I understood and agreed with the quote, "Claiming Java is easier than C++ is like saying that K2 is shorter than Everest."

      Since then though, I've seen a lot of kids grow up the other way, learning Java or whatever first. To them, OOP is obvious, but pointers are very difficult for them. Organizing code into modular sections just makes sense, since you are kind of forced to think in terms of classes anyway.

      --
      "First they came for the slanderers and i said nothing."
    13. Re:quicksort better than OOP? by narcc · · Score: 1

      Is that what I said?

      Apparently not. I misinterpreted "the unique thing". My bad.

      The unique thing is the idea of functions moving around with the data it operates on.

      Still, it's clear that you're confused. OOP did not introduce objects.

      The Liskov substitution principle is almost a necessity for truly flexible code.

      Ignoring for the moment that that has absolutely nothing to do with my comment: that statement is completely incoherent.

      The Alan Kay style of OOP is much nicer in my opinion

      And not at all like OOP as it is generally understood by Java, C#, and C++ programmers. Again, no one can even agree on what constitutes OOP. It's an incoherent concept at best. Dig up a few definitions. You'll find most are vague, many are inconsistent, and a few so broad that they're meaningless.

      Organizing code into modular sections just makes sense

      Indeed it does. Modularity is good and many beginners seem to naturally understand the need. OOP in the *ahem* classical sense, however, is anti-modular and is thus ill-suited.

      since you are kind of forced to think in terms of classes anyway.

      Classes aren't essential to objects, you know. I'd even go as far as to say that they're a harmful concept. Skim through whatever books you have lying around and you'll soon discover that a good bit about what is written about "OOP" is ultimately about dealing with the problems caused by the flawed concept of classes and class-based inheritance in many popular so-called object oriented languages. An easy example would be design patterns. You'll find that a good number of the "patterns" found in GoF are intended for problems that you simply don't encounter, or which have solutions so trivial that they don't warrant special attention, in other languages, including other so-called OO languages.

      It could be that you believe classes to be essential to OOP, but I've not seen many people make that claim.

    14. Re:quicksort better than OOP? by phantomfive · · Score: 1

      And not at all like OOP as it is generally understood by Java, C#, and C++ programmers. Again, no one can even agree on what constitutes OOP. It's an incoherent concept at best. Dig up a few definitions. You'll find most are vague, many are inconsistent, and a few so broad that they're meaningless.

      Really, OOP is having the data combined with the functions that operate on the data. Everything else involved in OOP derives from that.

      "OOP is an exceptionally bad idea which could only have originated in California" — Edsger Dijkstra

      Bertrand Meyer digs deeply into the Liskov style of OOP in his book Object Oriented Software Construction, and concludes that invariants and proofs are one of the most important concepts that can be learned from the Object Oriented Method. So much so that he created a language based around that idea (Eiffel, where each method and class can have a formal contract). The end result looks a lot like what Dijkstra himself wrote about in A Method of Programming.

      In other words, digging deeply into OOP, which Dijkstra despised, leads directly to programming by proof, which Dijkstra loved (maybe too much).

      --
      "First they came for the slanderers and i said nothing."
    15. Re:quicksort better than OOP? by narcc · · Score: 1

      Really, OOP is having the data combined with the functions that operate on the data.

      Hey, it's your definition. Enjoy. Just don't expect many people to agree with you. (That's my point!)

      Hell, even I'll disagree with it on the grounds that it's insufficient. On it's face, it's so broad that it encompasses just about everything, which is clearly not what you intend. Mix in a bit of context and you just get a simple definition of "object".

      Everything else involved in OOP derives that.

      You'll need to tweak your definition a bit before you can derive anything. What are these principles that naturally derive from your definition (or hopefully soon-to-be modified definition)?

      digging deeply into OOP, which Dijkstra despised, leads directly to programming by proof

      Don't be silly. Meyer doesn't offer anything of the sort in OOSC, nor does anyone anywhere else. (If they could, you'd necessarily have a solid mathematical foundation and no further ambiguity as to what constitutes OOP!) What you do find in his overweight book are a lot of bold claims which are NOT supported by the literature. (For example: Right up front he claims that people who "master" OO techniques can produce software faster and cheaper.) He also makes an irritating habit of misrepresenting functional and structured approaches to bolster his never-ending salesmanship of Eiffel. The unnecessary build-up to the big "reveal" comes off more like a side-show performance rather than a scholarly work (which, by the way, it is clearly not!).

      Moving back for a second...

      Everything else involved in OOP derives that.

      Do you believe that the "principles" Meyer offers in his advertisement -- oops, I mean book -- can be derived from your definition?

    16. Re:quicksort better than OOP? by phantomfive · · Score: 1

      Bro, I don't expect you to like Meyer's book. I don't expect you to agree with my definition. You started out by saying OOP is nonsense. You're obviously only going to look for the bad in things, not the good, because you already have preconceived notions.

      --
      "First they came for the slanderers and i said nothing."
    17. Re:quicksort better than OOP? by suutar · · Score: 1

      Nothing can be unique to OOP; there are non-OOP languages that are computationally complete.

      That said, in my experience, objects in Java (and to a lesser extent C++) make it easier to do some useful/"good" things than to not do them (internals hiding, collecting functionality in fewer places, coding to an interface which can then be implemented by whatever real data type you want), and that's a useful trait.

    18. Re:quicksort better than OOP? by narcc · · Score: 1

      Objects can be handy when used appropriately. I don't know that anyone disputes that. OOP, however, isn't even a coherent concept. That's my objection.

      Putting that in context here, quicksort is an important algorithm. It's well understood and can be taught. OOP is nebulous and incoherent. It cannot be taught as no one can even agree on so much as its basic constituents! You'll even find people who don't agree that objects are essential to OOP. In short: whatever you teach, you'll find a large number of people who will not agree that what you're teaching is OOP.

  26. 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 Guy+Harris · · Score: 1

      A language's usefulness is more a matter of the abstractions it supports than the particular libraries available

      Not that the libraries aren't useful. All other things being equal, including the stuff you don't have to write in that language because somebody else has already done so, yes, a language with clean abstractions is better than a language with not so clean abstractions, but the libraries aren't exactly chopped liver.

      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.

      You are aware that a compiler is more than just a parser, right? There are these minor sub-projects of a compiler called "code generators" and "optimizers". Understanding the principles of parsing and code structure won't help you understand the principles of optimizing and generating code.

    2. 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
    3. Re:The Closure by narcc · · Score: 1

      tl;dr - The most important thing to learn is the trendiest thing. Closures are all the rage right now, so I'm going to go with that.

    4. Re:The Closure by Anonymous Coward · · Score: 0

      Trendy if you're ignorant.

    5. Re:The Closure by phantomfive · · Score: 1

      Yeah, it wasn't clear to me either from his comment why he likes Lisp. Because it makes writing an interpreter really easy?

      --
      "First they came for the slanderers and i said nothing."
    6. Re:The Closure by gnasher719 · · Score: 1

      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.

      You mean like blocks in Objective-C, which everybody writing non-trivial code for MacOS X and iOS would know? Yes, absolutely important.

    7. Re:The Closure by narcc · · Score: 1

      I get the attraction to Lisp. It's the same attraction I have to forth. They're both fun and interesting to implement. Well, at least when you first encounter therm.

      So, yeah, I guess "Because it makes writing an interpreter really easy" is a good call.

    8. Re:The Closure by Warbothong · · Score: 1

      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.

      I think these are excellent suggestions, but I think lexical scope (eg. Scheme) should be understood before dynamic scope (eg. McCarthy's LISP). I often see a lack of understanding of lexical scope, eg. in Javascript and PHP, leading to redundant arguments, abuse of globals, etc. McCarthy's LISP and LISP-in-LISP is an amazing achievement and discovery, but it got its scoping wrong! ;)

    9. Re:The Closure by Anonymous Coward · · Score: 0

      How easy is it for someone else to understand your brilliant ideas spewed down into code, which could be expressed in one of million ways?
      How cheap will such a person's time be, and how much time would be need to be spent?

      I'm not saying ideas are not powerful, but there's a reason businesses mostly default on widely available languages and libraries, as opposed to ideas and concepts which can be thought of arcane magic more than practical code.

      Let's face it. Very very few have the willingness, time and mentality to implement a compiler or interpreter. Hell, I've done some crazy stuff, like running competing *machine code* in memory to evolve and compete with eachother, but not that. Compilers and interpreters are just not everyone's cup of tea, and it needn't be either. For most people they are tools, not an end in itself to spend their lives on.

  27. I'm best by Anonymous Coward · · Score: 0

    I'm the best programmer on the planet. That's why God chose me for His temple.

    I took 5 asm courses, a compiler course and operating system course. Meat and potatoes.
    I learned to read datasheets. I studied digital design. I am expert on boundary between hardware and software. Plus all my job experience.
    I was a professional OS developer at age 20 on Ticektsmeter's VAX os in VAX asm. I was paid for x86 asm, 8051 asm projects, 68000 asm projects, PIC asm projects, atmel acr asm projects. I am a master of bare metal asm programming interacting with hardware with no operating system.

    1. Re:I'm best by TechyImmigrant · · Score: 1

      asm is bare metal? I design the instructions the asm runs on by rearranging logic gates.

      I could claim that it is bare metal, but then someone would come along and say they design the transistors used to make logic gates by pushing atoms around.
       

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  28. 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.

    1. Re:Code Comments by UnknownSoldier · · Score: 1, Informative

      Comments should comment WHY, as in "work-around X because commit #123 made assumption Y"
      If I want to know HOW the code works you should be able to read the code. (Barring "tricky" optimizations of course.)

      I would also _proper_ naming of variables, not everything abbreviated without any vowels that won't make any sense in 6 months.

      Take the time to do it RIGHT the first time. 90% of the time on a job you are maintaining code, not writing new code.

    2. Re:Code Comments by TheLink · · Score: 1

      1) Also invaluable are useful logging, logging messages and exception handling.

      Those fancy algos, data structures you can find built-in or on google- usually a better programmer has done the work already and using their code/ideas may improve the average quality of your program ;). But decent log messages for your own programs? You usually have to write those yourself.

      Example of bad error messages: "NullReferenceException: Object reference not set to an instance of an object"
      Why is that bad? It doesn't tell you which was the offending object. It's like saying "Doctor it hurts!" without saying where or what hurts.
      In contrast something like this is far more useful:
      E121: Undefined variable: g:pymode_updatetime

      Similar for "file not found/accessible" errors, don't just log that a file was not found/accessible, log the path of the file too.

      What I do when performance isn't a big issue is to log all messages including debug level messages to a circular buffer of configurable size. Then when a log message of ERROR or worse level is logged, the contents of the buffer are prepended before the log error message as context log messages.

      This way you don't get your logs cluttered with debug level logs all the time, but you get to see debug level messages just before each error.

      It's not any fancy datastructure or programming concept. I don't see many top coders doing this so perhaps it's a bad idea (definitely a bad idea for high performance code sections). But so far it works for the stuff I do.

      2) Then there's input validation/filtering and output escaping/encoding.
      It's good to code as if someone is out to pwn your program. If you don't, you end up with hundreds or even thousands of holes that one unfortunate day need to be fixed, verified and retested.

      My problem so far is I tend to inherit code like that... Full of bugs and security holes. Oh well...

      --
    3. Re:Code Comments by gnasher719 · · Score: 1, Interesting

      I would also _proper_ naming of variables, not everything abbreviated without any vowels that won't make any sense in 6 months.

      That's where the importance of typing comes in. Every programmer should take a typewriting course. Makes them a ten times better programmer if you don't have to use abbreviations and avoid commenting because typing takes you too long.

    4. Re:Code Comments by Anonymous Coward · · Score: 0

      Comments should comment WHY

      After I've reviewed some of my co-workers' code, I have many comments of the form // ??? WHY ???.

  29. Search + Search & Replace by ClassicASP · · Score: 1

    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.

    1. Re:Search + Search & Replace by Anonymous Coward · · Score: 0

      I use mind all the time.

      Yes, that's the most important thing when programming.

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

  31. Abstractions by gehrehmee · · Score: 1

    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.

    --
    "You know, Hobbes, some days even my lucky rocketship underpants don't help" -- Calvin
    1. Re:Abstractions by ggpauly · · Score: 1

      Correct you are

      --
      Verbum caro factum est
    2. Re:Abstractions by narcc · · Score: 1

      Design patterns?

      Jesus, it's like you're a best troll ever.

    3. Re:Abstractions by dave420 · · Score: 1

      There you go again, showing the world the gap between how much you know and how much you think you know. The hubris! It burns!

    4. Re:Abstractions by narcc · · Score: 1

      Please, enlighten me then! Show me the error of my ways.

      If you can, stay away from platitudes, they won't actually help you make your case. I completely understand if that's all you can offer; that's my point after all.

  32. Pattern Recognition by Anonymous Coward · · Score: 0

    If there's one thing I've found most useful in developing software, designing computer systems (or any system, for that matter), is to develop a keen sense of pattern recognition.

  33. How stuff works. by Anonymous Coward · · Score: 0

    For low level that missing (at least from the summery: arrays, caches, and concurrency.

    For higher level: abstraction, interfaces and algorithms. (Why cover quicksort if you don't include the concept of having an algorithm, with an interface that provides an abstraction?)

    Some of my other favorites: Idempotentcy, stateless vs stateful, mutability, policy vs implementation, lazy vs eager, protocols (as a concept), cache-oblivious algorithms.

    Also: higher order functions, dynamic dispatch, polymorphism.

    Lastly, screw teaching quick sort. Tim sort show something very important in software engineering: hide your optimizations behind a good abstraction, because they make one hell of a mess.

  34. I can give you one tip by GoodNewsJimDotCom · · Score: 1

    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 through your entire code base. I also suggest prayer. I find prayer works.

    Anyway, if you favor arrays over pointer driven data structures, you simply won't blow your leg off as they say in C++. Your errors will be easier to track down. You have a lot less chance of encountering a bug that you can't easily debug which also crashes your entire program randomly. And finally, you'll become an array master(since you use them so much) so your code will come out faster.

    Now some people might disagree with this, but this works for me. Sure there's some times you absolutely need to use a creatively designed linked list, but if you can do it with an array and an unnoticeable slowdown, go for!

    1. Re:I can give you one tip by Anonymous Coward · · Score: 0

      I think you mean a dangling pointer when you say a dereferenced pointer. A dereferenced pointer is completely harmless if it is not dangling (or uninitialized, but only a crappy programmer would leave pointers uninitialized).

      Anyway, there's another reason to use arrays when possible: They are generally faster than pointer-based data structures.

      However, if you get into pointer problems for something as simple as a linked list, consider yourself a bad programmer.

    2. Re:I can give you one tip by muridae · · Score: 1

      Well, in C++, since an array is just a pointer behind a layer of language obfuscation . . .

    3. Re:I can give you one tip by Anonymous Coward · · Score: 0

      An array is just syntactic sugar over pointers.

  35. Yes. by Anonymous Coward · · Score: 0

    Yes.

  36. 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
    1. Re:Great read: The Pragmatic Programmer by Anonymous Coward · · Score: 0

      While not a programming book per se, Alan Cooper's "The Inmates are Running the Asylum" is a great book for learing to think like a user, instead of the engineer/programmer. It's an entertaining read that points out some of the little interface design cues that we have come to incorporate into our daily lives. One of the examples he uses is that when we see a panel on a door, we think push, we see a handle, we think pull. If we see a long bar handle on a push door, our instinct is to pull, when it doesn't work we have to reorient ourselves a little bit to handle the new information. If only more programmers realized that buttons are for on/off, radio buttons are for one of many selections, and checkboxes are for multiple on/off selections.I'd argue that, while not a particular programming skill, thinking about how the user will interact with your program is a good thing to know.

    2. Re:Great read: The Pragmatic Programmer by adam.voss · · Score: 1

      Here I liked Clean Code: A Handbook of Agile Software Craftsmanship better than Pragmatic Programmer. I guess it just seemed a little more modern to me, though in general the knowledge of both was timeless.

      I may have to go back and read Code Complete, it was thick and seemed to cover topics I had already read or been reading about in other other books, so I passed it over.

  37. 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.
    1. Re:Input validation by Anonymous Coward · · Score: 0

      Even more generalized than that: assume the user won't obey the "rules" of your application. They might not be aware of how things are supposed to work because they're a blithering idiot who will do something because it's possible (regardless of how stupid it may be) or on the other hand they might be particularly aware and want to try to break your application.

      Not trusting user input is just scratching the surface. It's more like Murphy's Law: if there's some condition where your application can break or behave unexpectedly, assume someone could trigger it. Because if you don't then it will happen.

    2. Re:Input validation by khallow · · Score: 1

      Nethack wouldn't be even half the fun it is, if it had input validation.

  38. Encryption by AHuxley · · Score: 1

    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 and their reputation. Their global vision, lies and domestic issues will be all over your clean CV for years.
    Study your boss the way a team studied your CV. Who is really paying the bills.
    Programming languages are like fads, short-lived and very amazing. Learn the educational basics, then see what interests you.

    --
    Domestic spying is now "Benign Information Gathering"
    1. 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

    2. Re:Encryption by AHuxley · · Score: 1

      Its a movie ~quote/line from The Graduate (1967)

      --
      Domestic spying is now "Benign Information Gathering"
    3. Re:Encryption by viperidaenz · · Score: 1

      If you want to get in to encryption, learn math, not programming.

    4. Re:Encryption by Anonymous Coward · · Score: 0

      And knowing what the original line was, I think the following response would be totally justified:

      That's what she said.

    5. Re:Encryption by DMUTPeregrine · · Score: 1

      If you want to design encryption algorithms, you probably want a PhD in number theory. To start. Then go break someone else's cipher, and publish the break.
      If you want to implement encryption algorithms, you probably want a PhD in computer engineering. You have to consider not just the software, but the side-channel attacks through all possible hardware as well.

      Encryption is hard, but it is possible.

      --
      Not a sentence!
  39. 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.
  40. 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/
    2. Re:Actors and State by DMUTPeregrine · · Score: 1

      One of my favorite things about finite state machines is how easy they are to translate into hardware. They're a high-level construct, you can draw them as flowchart-like diagrams to structure your program, yet you can also implement them as a bunch of gates and flip-flops. They make it easy to think about your program, and what can happen at each stage.

      --
      Not a sentence!
  41. The first law of code: make sure it works by mveloso · · Score: 2

    EOM

    1. Re:The first law of code: make sure it works by Anonymous Coward · · Score: 0
    2. Re:The first law of code: make sure it works by Anonymous Coward · · Score: 0

      You misspelled "EOF".

    3. Re:The first law of code: make sure it works by mveloso · · Score: 1

      BEL BEL BEL. That should have been EOT, technically. Been a long time.

  42. Maintenance by xbytor · · Score: 1

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

    1. Re:Maintenance by isorox · · Score: 1

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

      This does not mean a comment saying "HA HA -- good luck finding out what this does. I haven't got a clue!"

  43. Recursion (X) by Anonymous Coward · · Score: 0

    Recursion = Recursion (X-1) + Recursion (X-2)

  44. Recursion by EdmundSS · · Score: 1

    In the list of concepts, along with OO, closures & functions, recursion is essential knowledge. If in doubt, see this post.

    1. Re:Recursion by ggpauly · · Score: 1

      and higher order functions

      --
      Verbum caro factum est
    2. Re:Recursion by Anonymous Coward · · Score: 0

      In the list of concepts, along with OO, closures & functions, recursion is essential knowledge. If in doubt, see this post.

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

  46. Teach them to think logically by Anonymous Coward · · Score: 0

    To solve a problem you have to understand it.

    An idiot with the best tools in the world will still be bested by a thinking man with only what he needs.

  47. Arrays start at zero by spitzak · · Score: 1

    Arrays start at zero and go through size-1.

  48. 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
    3. Re:Left-corner design by turp182 · · Score: 1

      Good stuff.

      I would alter your basic idea to note that the most difficult parts should be addressed first. Things like integrations.

      The most difficult parts are those that are most likely to cause time and budget overruns. Taking care of them early makes things much easier in the long run. I call the hard part "pillars", things upon which a system is built.

      And if one can't determine the "pillars" (or understand why they are what they are), one shouldn't be involved...

      --
      BlameBillCosby.com
  49. Non-blocking I/O by Anonymous Coward · · Score: 0

    Node may feel too 'advanced' for the absolute beginner, but I would recommend any course mention input/output issues and how the use of callbacks can be so important.

  50. Regular Expressions by tbg58 · · Score: 2

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

  51. FP; project scheduling by Allen+Akin · · Score: 1

    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.

  52. 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
    1. Re:Recommendations for a kid? by muridae · · Score: 1

      Teaching the concept doesn't have to be the same as 'just teach the concept', You can do a puzzle with recursion, like Towers of Hanoi. Start them with a physical model, then keep adding rings. Let a kid figure out how adding a new ring increases the number of steps to solve it much faster than the ring before did. Ta-da, recursion and Big-O complexity, without actually bringing up either one. If the kid gets interested enough to grab a book on programming, then some of the basic stuff is already grounded in a real concept and they'll have a better understanding of it. Then again, I had a great computer teacher from 4th grade through 7th who taught like that on some shiny new Apple ][ and an occasional C64. Asked her years later why she taught us like that, and how it had helped me jump ahead in college. It was because she didn't know how to program at all, the computers were a gift to the school, and so she just gave us puzzles that could be solved without a computer and that it amazed her how kids could pick up the technology to solve the problems. Apple Basic was easy enough to read, and she forced comments and writing it on paper first, so she could see that we understood the problem and weren't just throwing random things until something worked.

      Bonus to the Towers problem: does where you put the smallest ring determine where the final tower will be? How, and why?

  53. 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?

    1. Re:The nature of reality. by VortexCortex · · Score: 1

      s/contractor/contactor/

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

    2. Re:The nature of reality. by Guy+Harris · · Score: 1

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

      Your ideas are intriguing to me and I wish to subscribe to your newsletter. May I see your plane ticket to Stockholm?

  54. the absolute most useful idea.... by Anonymous Coward · · Score: 0

    DOCUMENTATION. whether for yourself later on, other developers, or the oft-neglected end user.

    1. Re:the absolute most useful idea.... by Anonymous Coward · · Score: 0, Funny

      Learn to read code, loser.

    2. Re:the absolute most useful idea.... by Anonymous Coward · · Score: 0

      Says the loser^H^H^H^H^Hdeveloper that doesn't know how to properly document their own code.

    3. Re:the absolute most useful idea.... by maxwell+demon · · Score: 1

      OK, compare the following two functions.

      char* find(char* s, char ch)
      {
        while (*s && *s != ch)
          s++;
        return s;
      }

      with

      /* OK, I could have used the standard library, but hey, I'm paid by lines of code,
        so why not just add an implementation of my own? It's not too hard, is it? */
      char* find(char* s, char ch)
      {
      /* Well, if you didn't already guess what this function is for, the following code
          surely will tell you. If not, you're not qualified to change it anyway */
       
      /* Oh, and for the assholes who want to put error checking here: Don't. This
          function is only meant to be called with valid input. Error checking would only
          cost unnecessary performance. If you call it with invalid input, it's your
          fault anyway. */
       
        while (*s && *s != ch)
          s++;
       
      /* OK, work done. Let's return. */
       
        return s;
      }

      Clearly the second version is better, don't you think?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:the absolute most useful idea.... by fritsd · · Score: 1

      hmm... wouldn't it be nicer to return ( (*s) ? s : NULL ) , I wonder..

      --
      To be, or not to be: isn't that quite logical, Slashdot Beta?
  55. 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.

    2. Re:Keep narrowing - a LOT by phantomfive · · Score: 1

      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.

      Well said.

      --
      "First they came for the slanderers and i said nothing."
    3. Re:Keep narrowing - a LOT by Anonymous Coward · · Score: 0

      In my opinion: version control is such a *big* feature that should be recommended to any kid, even if he does not want to become a programmer. I would even say that it. The idea that you keep track of all changes you do, in a way you can go back to a previous state. The idea being able to merge those changes in a mostly automated way... KILLER

    4. Re:Keep narrowing - a LOT by Anonymous Coward · · Score: 1

      I've been half-tutoring some teenagers on digital electronics and LUA recently.

      How? They want to do awesome stuff in Minecraft.

      You'd be surprised how motivated a 14 year old can get when you tell them that if they write a little bit of code they could never have to manually smelt an ingot of metal again ;)
      They also get really surprised when you mention that Redstone is essentially digital electronics (and recently analog) in a nutshell :D

    5. Re:Keep narrowing - a LOT by SuperKendall · · Score: 1

      I would agree if most other things could be version controlled as well as code - but most things cannot be...

      I could be persuaded that it's a more general skill that should be taught to everyone, not just programmers, but I don't know if people not inclined to be programmers would understand well or make effective use of version control. I suspect the answer is, they could not...

      I really think it's better to live without version control while you learn programming so you can really appreciate it as one of the next intermediate steps you pick up. You have to interact with it anyway to make use of third party code so moving into it becomes natural as you become a more advanced coder.

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

      How about we point beginners to a simple imperative language with an interactive mode?

      Because that works for some people and not others. I hate to leave anyone behind by suggesting one thing, and am not sure how to best find out which path of learning programming will be productive for any one student.

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

      It wasn't arbitrary. It's a proven approach that has been shown to be successful; even with very young children. I honestly never considered the possibility that it couldn't be near universal.

      What do you have in mind as alternatives?

    8. Re:Keep narrowing - a LOT by SuperKendall · · Score: 1

      It's a proven approach that has been shown to be successful; even with very young children.

      If it has shown success, why are the numbers of programmers not rising? They may learn it well, but they may also not stick with it. The only way you stick with programming is if it's inherently appealing to you personally as an activity. If someone had started me programming in Python I'd probably be a pilot or lawyer or something else less useful to humanity.

      What do you have in mind as alternatives?

      Just what I said - a sandbox that lets you use any approach to organizing structure/behavior (like OO, procedural, functional, whatever) and also the ability to use any language you liked (practically speaking all of the popular ones, like C or C++ or ObjC or Scheme or Lisp or Python or PHP or Perl or Ruby or... etc).

      Then we would see what approach a kid took to figuring out how to perform a task, and the language they ended up using. Perhaps it's too much of a mash, I have no idea. But I think it would in the long term be better than what we are doing.

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

      If it has shown success, why are the numbers of programmers not rising?

      Are they static or in decline? I've not seen any data to suggest that.

      Anyhow, while it's a proven technique, it hasn't seen wide-spread use since the 80's when the research I'm referring to was conducted. I can only speculate as to why.

      Just what I said - a sandbox that lets you use any approach to organizing structure/behavior ... and also the ability to use any language you liked

      Isn't that exactly what we have now?

      Then we would see what approach a kid took to figuring out how to perform a task

      Where would they begin? They'd almost need to be experts before they could make any sort of meaningful choice. As beginners tend to have little to no preexisting knowledge (that's what makes them beginners, after all) they'd essentially be making their selections at random. I don't see how that would benefit beginners in any way. It would like learning to swim by getting dropped from a helicopter in to shark-filled ocean waters.

    10. Re:Keep narrowing - a LOT by SuperKendall · · Score: 1

      Isn't that exactly what we have now?

      Not all all, because you have to make a choice of a language first. I want to be able to have students choose the other way round. We are living in a world of very deep silos.

      Where would they begin?

      With having small problems to solve by programming, and trying different ways to solve them. Eventually the problems get harder and they chose whichever path seems to them the easiest way to address the problem.

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
  56. State machines, Pushdown Automata, Turing Machines by Anonymous Coward · · Score: 0

    These lead into the ideas of computability, complexity and space(memory)/time constraints. All other algorithms can be understood better and their suitability evaluated based on one's understanding of these.

  57. Reflection is one of the most useful concepts. by aristotle-dude · · Score: 1

    Reflection, as found in .NET allows you to write extremely generic yet powerful code easily. For example, I have used it to write a method that can write any class (or list thereof) to a CSV file of any format by passing in a field-to-value map object along with the object data you want to store. The beauty of this is that you can store the format of the file externally and make changes to it without having to rewrite the code. The only time you would need code changes was if you needed additional properties added to the class you want to write out.

    --
    Jesus was a compassionate social conservative who called individuals to sin no more.
    1. Re:Reflection is one of the most useful concepts. by stanlyb · · Score: 1

      Translated: Java, Delphi. But NO C++.

    2. Re:Reflection is one of the most useful concepts. by Anonymous Coward · · Score: 0

      I remember patting myself on the back for such OO tricks. However, these days I keep thinking:
      What is the actual need here?
      Really, what is REALLY required?

      Ie. Isn't encapsulation just a subset of "separation of concerns"?
      And isn't functional paradigms just a subset of "provide with the least amount of surprise", aka "know your customer / user"?
      Do I have a need for OO, functional programming (that noone else understands), yet another implementation of quicksort, making new libraries? NO, not REALLY.

      It's got me to realize I have very few needs if any, at least existential ones.
      It's also gotten me to realize I don't need to built a temple, where only a stump to chip wood on is really required.
      And then I go and fetch the water, for I need warmth, water, food and good company, but not so much else.
      I do have hobbies, but it's not making assembler or C++ libraries that never gets put to proper use..

      I've been on the block so much that when I really know what I need, I can quickly make it, but before then, I'm tired of running in circles and try to put my effort where it can pay back in some way for myself and other people.

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

    1. Re:Fun & Logic & Games by Anonymous Coward · · Score: 0

      "fun to practice Logic"...sums everything up in one phrase. Nicely done.

  59. Two words by Anonymous Coward · · Score: 0

    Bubble sort. Best idea ever.

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

    2. Re:Two words by dintech · · Score: 1

      Additionally, there is one particular case where bubble sort can be a good algorithm: in data sets that are almost sorted.

  60. Code is not done until it's done. by Anonymous Coward · · Score: 1

    The worst you have seen is someone taking twice their estimate. You must be working on some easy problems.

    The practical issue is that when solving real problems the work in writing code is 90% design, and since no one has done that before estimating with any accuracy is a pure guessing game. The harder and the more challenging the problem the harder it becomes to give an accurate estimate.

    That doesn't mean you can't control your schedule. You can always drop features or build incremental developments and deliver what you have. But giving a precise estimate is nonsense.

    In fact I have found that I have gotten better and not worse with age, as the problems I am tackling have gotten harder, and correctness has become more important.

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

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

    1. Re:Design/architecture by stanlyb · · Score: 1

      Wrong, they are 99%. The "engineers", who does not even know what svn is, for example.

  63. Programming Books are full of Fairy Tales by Anonymous Coward · · Score: 0

    Reality is defined by what the machine does, not what books say the machine should do.

    1. Re:Programming Books are full of Fairy Tales by maxwell+demon · · Score: 1

      Yes and no. If your machine does something different than the book says it should do, you've found a bug in your system. Work around it. Do not rely on it. The next version of the buggy component might have the bug fixed, and your code will break if it relies on it.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  64. Re:I can think of one that Steve Jobs disagreed wi by acscott · · Score: 1

    Yes. Divide and conquer (or structured systems programming), and make your inheritor's life good (good karma). A good compiler is good. Typing is a computer science term--not a reference to pecking at the keyboard. Algorithms is a funky term. Ultimately it is a reference to doing things in discrete mathematics. Mathematicians really do give "it" away. "...the rest is just a mixtures of ingredients...." This is a reference to making things taste good. It's relevant, informative, honest, and a description of doing the right thing. It's a moral attitude. To sum it up for people not in the culture: Do good, engineer, break problems up into their component parts. To lazily invoke a giant, beauty is harmony of parts in a whole (Aristotle somewheres).

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

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

    1. Re:Sanity by Anonymous Coward · · Score: 0

      We prefer the term savant syndrome.

    2. Re:Sanity by EmagGeek · · Score: 1

      Come, now. Everyone has their place. Delusional, idiot developers are needed for projects like healthcare.gov.

  66. And here I thought you should avoid Goto by Anonymous Coward · · Score: 1

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

  67. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 1, Insightful

    Find me a mechanic that can build a V8. They don't have the metallurgy, the physics or the engineering to do it. That was a ridiculous example, and I wouldn't want to work for you.

  68. Security by AYeomans · · Score: 1

    Amazingly security, secure programming, defensive programming, security testing don't make the list.
    Maybe that's why there are so many code vulnerabilities out there.

    --
    Andrew Yeomans
  69. 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."
  70. Packaging and productionising by AYeomans · · Score: 1

    No mention of how to make professional installation packages which can be maintained in a production environment.

    Really the list is "things every coder should aim to know". Need much more to get the "software engineer" label.

    --
    Andrew Yeomans
  71. Re:I can think of one that Steve Jobs disagreed wi by Kevin+Fishburne · · Score: 1

    Couldn't agree more. With respect to algorithms already implemented, there should be a one-stop repository of them with descriptions and variations for different languages. Like Wikipedia but just for algorithms (even painfully simple ones). More than anything else this would benefit all programmers, but especially newer ones. Searching Google for stackoverflow/etc. posts sometimes helps but is often an unnecessary timesink when you have a specific algorithm in mind but don't know what it's "called".

    --
    Buy your next Linux PC at eightvirtues.com
  72. Re:I can think of one that Steve Jobs disagreed wi by Dog-Cow · · Score: 1

    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. If I were hiring a programmer (rather than being one), I'd look for people that know what needs doing and how to find code that already does that job. In your typical app, there's very little custom algorithm work. The vast majority is simply tying pieces together to generate the desired outcome.

  73. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    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.

    There is a slight risk with teaching this blindly.
    Look at PHP, full of library functions that does what you want but not exactly. The result is a mess of library calls with unnecessary complex glue logic that adapts the data before and after the call.
    If you can't find a sort algorithm that fits how you structure your data the best solution might not always be to restructure your data.

    I would say that it is just as important to know when to roll your own code as to know when you shouldn't.

  74. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    I'm never going to pay a mechanic to build me a replacement engine from scratch. So why'd I need a mechanic who'd know that?

    That's as stupid as not using doctors because they don't know how to build a brain from scratch...

    All I want is a mechanic/doctor who knows how the parts work reasonably well, how they are likely fail and how to fix them for a reasonable price (it's easier to fix something if you have heaps of money, but I don't have heaps of money).

  75. Fundamentals by Anonymous Coward · · Score: 1

    The question didn't call for an overview of the field, I.e. ontology, but a list of Fundamentals. An ontology is useless to a kid.

    Heres my list:
    - Variables
    - Algebra
    - Logic
    - Functions
    - Loops
    - Structures and Classes
    - Iteration
    - Recursion
    - Input / Output

    1. Re:Fundamentals by narcc · · Score: 1

      I thought this was supposed to be uncontroversial?

      Classes? You can't be serious! Logic? If slashdot is any indication, most programmers couldn't pass an undergrad course in logic. Sure, you'll need an incredibly tiny subset of logic, but it's not a topic that needs special consideration. Most beginners work out the basics themselves without assistance. They certainly don't need a through understanding of the subject like a philosopher. I could go on ...

      A better (much shorter) list of fundamentals:

      - Data - variables, types, and structures (Just the basics, of course.)
      - Flow control (iteration, branching)

      That's it, really. (I may have even gone too far!) I can't really add anything else without stepping in to controversial territory.

      Useful is a different matter, naturally, and we could add quite a bit more to the list. Though I doubt that it would be nearly as long as yours without becoming controversial.

  76. And networking? by Anonymous Coward · · Score: 0

    Two pieces of software will communicate over some Internet Protocol. If you have no idea how information travel (or not) between two machines, then stop here. Did I mention security too?

    1. Re:And networking? by Anonymous Coward · · Score: 0

      Networking, while a fascinating subject, is not programming. Networking is just I/O. Programming is about what happens between input and output.

  77. Re:I can think of one that Steve Jobs disagreed wi by Jane+Q.+Public · · Score: 1, Troll

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

    Cool. So when something fails, you can pay them to go find some other pre-built part, and follow the instructions to hopefully make it work.

    That's fine, I suppose, if you have the time and the budget. I prefer to simply hire people who know what the hell they're doing.

  78. Re:I can think of one that Steve Jobs disagreed wi by Joce640k · · Score: 1

    I'm never going to pay a mechanic to build me a replacement engine from scratch. So why'd I need a mechanic who'd know that?

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

    --
    No sig today...
  79. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    How recently has your hiring strategy worked?

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

  81. Collections... by Anonymous Coward · · Score: 0

    Data structures, specifically collections. Whenever you have to store more than 1 of something, you have a -lot- of questions to ask yourself before you touch that keyboard. Ordered or unordered? Duplicates allowed or not? Quick lookup via a key or unimportant? Iterating forwards, backwards, or never? Random access and removal, or chucking stuff on the end? Synchronised or unsynchronised? Answer all of these, before deciding whether it's a list, set, map, tree, queue, stack, and what subvariant of those you need. It'll save a -lot- of refactoring.

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

  83. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0, 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.

    Did I just get trolled? fuck

  84. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    To paraphrase a recently overused example,

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

  85. Lock-free algorithms? by sonamchauhan · · Score: 1

    Not that I know much about them

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

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

  89. 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."
    1. Re:Keep It Simple. by Anonymous Coward · · Score: 0

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

      -jcr

      C++ disaster? I completely agree with keep it simple, but with the added caveat that simple is in the eye of the beholder. JavaScript looks like greek to me, but I don't knock it because it's obvious there are people out there who wield it well (or at least solve problems).

      C++ may not be simple, but it serves an essential role building systems that no other language could do nearly as well if at all. Some features of C++ may be challenging for people not familiar with low-level programming or systems programming concepts, but that isn't the fault of the language. It just means you've picked the wrong tool or you've picked the wrong problem.

    2. Re:Keep It Simple. by Anonymous Coward · · Score: 0

      From its features, C++ is great. However it is not exactly a well-designed language. To start with, the C compatibility rule made it to bend C rules far beyond what C was intended for. Added to that, there have been syntax decisions early on which looked like a good idea, but turned out not to be that much of a good idea. Moreover with the newer versions, more inconsistencies are added in the name of increasing safety while still keeping backwards compatibility (some conversions are allowed only in certain syntactic constructs, but not in others). The result is a mess which is held together by lots of duct tape (like typename or foo.template bar).

      Unfortunately all the languages which set out to replace C++ also decided to throw out features which were considered "too complex" (often only to later re-introduce them in modified form). IMHO the ideal language would be a C++ with a syntax redesigned from scratch, and with some features made more orthogonal, but with no features removed (apart from some of the implicit conversions inherited from C).

    3. Re:Keep It Simple. by jcr · · Score: 1

      it is not exactly a well-designed language

      Stroustrup always intended it to be a research language, so any mistake or misfeature that people could think of was stuck in with no thought to the accumulation of needless complexity.

      It's not "designed", it's accreted.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
  90. 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 K.+S.+Kyosuke · · Score: 1

      make sure the math is there through at least algebra and geometry

      Oh, algebra is very much useful for programming. But not the "x+2=4, what is x?" kind but rather the modern algebra kind (I'm in a constant state of being awestruck by the American high school math terminology time and again.)

      --
      Ezekiel 23:20
    2. 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.

    3. 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
    4. Re:Foundation by Bing+Tsher+E · · Score: 1

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

      So you're saying that nobody should ever again program microcontrollers? All that is left to do is dance around up on the top with APIs and abstractions and 'data structures?'

      So all the underlying code is written by fairies using magic dust? Or it was written back in 1993 and nobody ever needs to look at it again??

      I guess 'trust the binary blobs in the device drivers' is good enough if you work with systems on a shallow enough basis.

    5. 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
    6. Re: Foundation by Anonymous Coward · · Score: 0

      No, he's saying that beginner programmers have better things to do than second-guessing the language designers and compiler writers. Implementing a problem in a few different ways and benchmarking it with a few different loads is a much better use of learning time IMHO.
      Not that I didn't enjoy learning it the hard way, back when I was 13, barefoot in the snow uphill both ways.

    7. Re:Foundation by Shinobi · · Score: 0

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

      And I hear this claim from many comp.sci people who write buggy, slow and effectively unmaintainable despite "best practices" programs, because they don't know that their "best practices" are all rooted in a theory that they hold universally over all hardware. Many of them don't actually fully understand debugger output, because "low-level is irrelevant, it's all about the algorithms"

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

      Since the focus was on getting started with the fundamentals of programming, all those are a benefit. Another bonus is that you have a more rapid "works/does not work" result, making it easier to maintain interest.

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

      As I pointed out earlier: This is a good place to get started anyway. Also, no matter of algorithmic design will help you if you don't know anything about the architecture you will run it on(FDIV-heavy algorithms on a CPU that didn't support FDIV's for example..... Or the aforementioned compiler monkeys who only know how to program(badly) for x86 running Linux or *bsd, and get completely stumped when faced with a DSP and barebone I/O...)

    8. Re:Foundation by Jorl17 · · Score: 1

      To me, it isn't about writing that weird code. It's about knowing what happens, so that I DO know when I really need to optimize and so that I DO know what's going on under the hood. I find it very important to understand the CPU and memory, how it all works. Many programmers still think of this as magic, and that's why they're programmers, not engineers. But this post mentions software engineering, not mere programming.

      --
      Have you heard about SoylentNews?
    9. 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*
    10. Re:Foundation by Anonymous Coward · · Score: 0

      No multiprogramming, meaning your code is free to use all of the resources and you don't need to think about different load conditions.

      Here's a big one. I've played with optimizing data-structures and algorithms for cache sizes, and I've had at least once where I could get the program to run 2% faster, but if you had any amount of background processes, you could get a 10% hit to performance because of cache evictions from a semi-idle background process. It wasn't worth the sensitivity to other programs to gain a small percentage.

      That being said, I don't know how many times I've had it where empirical evidence of an optimization showed that it was faster, but in theory it should have been slower. Once the optimization was being macro tested instead of micro tested, suddenly it was slower. Why? Because testing a smidgen of code doesn't reflect how it will play with other code.

      On their own, experience and theory are "ok", but until you can unite both, you'll never be great.

      Don't get me started on designing scalable systems for multi-threading. Then, sometimes slower is faster. Don't design the system to run fast when little is going on, design it to run fast when it's getting hammered. People need to understand negative scaling.

    11. 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.
    12. Re:Foundation by Gr8Apes · · Score: 1

      I think you've missed one detail there though - knowing how compilers work and translate into actual machine instructions is of more value than knowing Assembly for any particular CPU today, for the large majority of jobs out there. However, knowing it adds immense value as you have a different viewpoint about coding. It would also tend to make you more aware of what's going on under the hood of C++, the STL, Java, C#, and pretty much any other language, and in some cases how a particular language is probably unsuitable for a specific job. It also tends to formalize perceptions about data structures, and how critical proper design of data can be to a system's performance and scalability. These are things not learned when someone just gives you a hashmap and says "go forth young master coder".

      --
      The cesspool just got a check and balance.
    13. Re:Foundation by Anonymous Coward · · Score: 0

      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.

      Pointless pedantry.

      Until you've designed a microcontroller, you really don't know what's going on under the hood.

      Until you've designed a chip fab, you really don't know what's going on under the hood.

      Until you've mined raw materials to produce circuit boards, you really don't know what's going on under the hood.

      Until you've created an entire universe out of nothingness, you really don't know what's going on under the hood.

      At some point, you have to draw a line and say "this is the best place to start."

      That YOU started with programming Assembler doesn't make it the "best place to start." Technology moves on - you can spend 5-10 years learning and becoming an expert in the "fundamentals" you've outlined through pointless make-work, or you can start solving real problems, now, using the higher order tools and techniques that have abstracted away the majority of the underlying fundamentals you grew up working on.

      When you need to know something deeper for performance reasons, you can dig deeper. Until then, programming in ASM is pointless make-work.

    14. Re:Foundation by Samantha+Wright · · Score: 1

      I cannot, for the life of me, think of the last time I wrote a program where I didn't have to rearrange a simple mathematical expression like that at least once. Unless we're all writing text adventures and parsers now?

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    15. 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
    16. Re: Foundation by Anonymous Coward · · Score: 0

      No, you're claiming, and now reinforcing your claim, that there is a grand divide between high level and assembly level programming. Call it 'programming microcontrollers' if you insist on your own straw man.

      There is obviously a difference. But for an example: one of the best ways of grasping (oooh, icky) abstract concepts like pointers in C is to dig one layer down and understand how to build and manipulate memory structures in assembler.

    17. Re:Foundation by Anonymous Coward · · Score: 0

      Until you've programmed ASM for a micro controller

      How does asm for a microcontroller differ from asm for a PC? Apart from the microcontroller probably having a different instruction set, of course.

    18. Re:Foundation by DutchUncle · · Score: 1

      Back in the dark ages, we learned data structures and data-driven design by coding it in FORTRAN. Yes, that's worse than assembler. Yes, reference mnemonic memory circuits with stone knives and bearskins. But if you can manage to do useful things with simple tools, you can do so much better with better tools. You can't understand multiprogramming until you understand single programming - and can then see the concurrency issues you ignored or didn't think of. You understand memory hierarchy better if you start out with simple register-ram-backingstore, then add layers. You don't teach a child by starting with college; you start simple and add complexity.

    19. Re:Foundation by Anonymous Coward · · Score: 0

      100% agree, but on the other-hand, learning to focus on the problem at hand, and solve it rather than trying to use every language feature known to man, or write 10 layers of abstraction to wrap a sort algorithm is a skill that microcontrollers enforce by their very nature.

      I can not tell you how much code I see every day being written by "professionals" which are 99% garbage. Lets walk list A, putting it into list B, then walk list B, putting it into C, 5 or 6 times. The result is some huge couple thousand line piece of code that can be rewritten literally in 5-6 lines of concise code. I've been seeing this a lot in PHP and JavaScript lately. There is a phase web developers go through that seems to last a couple years where they write massive amounts of code that is completely unmaintainable and unnecessary. I think that fully associative arrays make it really easy for people to write a bunch of code without really thinking about what they are trying to do.

    20. Re: Foundation by Wootery · · Score: 1

      No, you're claiming, and now reinforcing your claim, that there is a grand divide between high level and assembly level programming. Call it 'programming microcontrollers' if you insist on your own straw man.

      No, TheRaven64 was saying that writing assembly code for a microcontroller is quite different from writing assembly code for a modern CPU.

      The examples Raven64 gave of the differences are valid: modern CPUs have FPUs and several layers of cache, where microcontrollers do not.

    21. Re:Foundation by JoeMerchant · · Score: 1

      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.

      There was a time I agreed with this, and I believe that technology has advanced sufficiently that I no longer do.

      For trivial. or very specific problems, you may still be able to out-perform an optimizing compiler - but for things that take more than a week to accomplish in a high level language, it will _usually_ take an impractical amount of effort to out-optimize modern optimizers. If you live and breathe code optimization, you might know just where the current optimizer technology is lacking and be able to make surgical strikes with your hand assembly code, but for the vast majority of applications, there is little to no ROI in doing this.

      I first came to this conclusion when analyzing code generated by the Cosmic C package for 6811 CPUs circa 1998, and have had it reinforced periodically by looking "under the hood" at what gcc produces for desktop PCs.

      Still, knowing a thing or two about how it works "under the hood" can save a programmer from doing something inherently slow in a higher level language - but the days of being able to beat the (mainstream) optimizers probably ended 15 years ago. Of course, if you're working with some under-developed tool-chain, then you can be effectively "working 20 years in the past" and then the old rules still apply.

    22. Re:Foundation by Anonymous Coward · · Score: 0

      "No multiprogramming, meaning your code is free to use all of the resources and you don't need to think about different load conditions."

      And you think that people who code for modern PCs aren't prone to this?

    23. Re:Foundation by Half-pint+HAL · · Score: 1

      Oh, algebra is very much useful for programming. But not the "x+2=4, what is x?" kind but rather the modern algebra kind (I'm in a constant state of being awestruck by the American high school math terminology time and again.)

      As others have said, what other kind of algebra is there?

      But more to the point, the obsession with the declarative programming paradigm is one of the things holding programming back. Algebra is a core part of classical mathematics and therefore is an underlying component of all mathematical thought. Deterministic problem solvers are a standard tool in research, but it's a black art as far as most programmers are concerned. Worse, many consider it somehow "not real programming" on grounds of being unoptimised.

      And so what? Code first, optimise later. Why should we concern ourselves with writing a task-specific problem-solver at the start of the project just because of some stupid prejudice against non-specific code?

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    24. Re:Foundation by Half-pint+HAL · · Score: 1

      I cannot, for the life of me, think of the last time I wrote a program where I didn't have to rearrange a simple mathematical expression like that at least once. Unless we're all writing text adventures and parsers now?

      Exactly: where you have to rearrange the expression. Why doesn't the computer do it for you?

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    25. Re:Foundation by Samantha+Wright · · Score: 1

      Because the people who write those sort of languages and the people who write the languages you're stuck using in the name of performance won't talk to each other and are essentially on opposite sides of the holy war of pure vs. applied mathematics.

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    26. Re: Foundation by Anonymous Coward · · Score: 0

      You had feet?!!?!

    27. Re:Foundation by K.+S.+Kyosuke · · Score: 1

      As others have said, what other kind of algebra is there?

      What I had in mind was the transition from the pre-18th/pre-19th century algebra which studied mostly the properties of numbers (see Devlin's "everything you learned in high school math is more than two and a half centuries old") to the modern branches that study the properties of mathematical structures in general, including itself (with important consequences for the properties and compositionality of computer programs themselves).

      But more to the point, the obsession with the declarative programming paradigm is one of the things holding programming back

      What are you referring to by "the declarative programming paradigm", and what are you contrasting it with?

      But more to the point, the obsession with the declarative programming paradigm is one of the things holding programming back. Algebra is a core part of classical mathematics and therefore is an underlying component of all mathematical thought. Deterministic problem solvers are a standard tool in research, but it's a black art as far as most programmers are concerned. Worse, many consider it somehow "not real programming" on grounds of being unoptimised.

      You sound like you'd probably like the VPRI papers (and the research itself, of course).

      --
      Ezekiel 23:20
    28. Re:Foundation by Bite+The+Pillow · · Score: 1

      Early java was plagued by string append instead of string builders, and other travesties, making it slower than it needed to be.

      Learning what happens under the hood can be a great way to wonder, why is this slower than that asm code I wrote a decade ago?

      Forget the complexities of a microcontroller, and focus just on "how the bits get fiddled".

      I have seen booleans persisted as pipe and zero, with no explanation, when non nullable bits would suffice, requiring conversion. The daily Wtf is full of inelegant solutions similarly over complicated.

      At least concede that comparing the bytecode output of a bad c# or java app with a functionally equivalent good design would grant insight. It can be generalised from there how much further down the stack to go.

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

    30. Re:Foundation by mrchaotica · · Score: 1

      (Sorry for replying twice; I left something out.)

      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.

      You should also be learning a functional language (e.g. Lisp, Scheme or Haskell) and maybe even a logic programming language (e.g. Prolog) as well.

      --

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

    31. Re:Foundation by gnasher719 · · Score: 1

      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.

      Please explain. I'm curious.

    32. Re:Foundation by skids · · Score: 1

      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.

      To wit, none of the lists seem to include: 2's compliment math, signed versus unsigned integer data types, endianness conversions, and alignment/locality.

      To the modern dynamic language coder these things sound like gory details to be avoided at all costs, and that's a huge problem: you cannot avoid the unavoidable. Endian issues especially are embedded in the core of everything, not just machine code, but also network protocols. This is why you end up with code in a dynamic language using big-integer operands and virtually-dispatched shift and mask operators to slowly shuffle bits about to deal with endianness. In pursuit of GC efficiency and lockless contention protection, the backend VMs seem to go to great lengths to avoid ever allowing the user to see a pointer or any information about memory layout, so no user of these facilities can ever write any code that actually suggests efficient memory layout based on knowlege of the algorithm, and any facilities offered to produce a final data structure e.g. a network packet that must have a definite layout necessarily involves an extra serialization step even if it would be possible to generate code to build the structure in place. And don't get me started that a good number of dynamic language backend VMs do not even have unsigned integer types at the register level.

    33. Re:Foundation by Bite+The+Pillow · · Score: 1

      I missed the "recommend to a kid" part of the question. I wondered why my turbo Pascal ran faster than my gwbasic, and my brother told me about compile and link. They never worked on my computer, but I understood the concept of compile vs interpret without having names for them.

      I think a kid would find this informative, and may shape their decision to be interested in lo vs high level code. As such, it should be introduced early, even just as a dangler they can ignore.

      I used debug to bring adventure characters back to life, so itwas directly useful to me.

    34. Re:Foundation by TeknoHog · · Score: 1

      Oh, algebra is very much useful for programming. But not the "x+2=4, what is x?" kind but rather the modern algebra kind (I'm in a constant state of being awestruck by the American high school math terminology time and again.)

      I think the terminology problem is the same everywhere, at least in Europe. For example, there's the Fundamental Theorem of Algebra that clearly relates to high-school algebra concepts, but in order to prove it you need either complex analysis or "higher" algebra. I like to call the latter abstract algebra, to highlight the fact that you're not necessarily dealing with "ordinary" numbers, but rather the abstract rules of computation. Also, I'm sure this is another case where language changes and we need to deal with it -- consider whether the ancient Arab mathematicians, from who we get terms like algorithm and algebra, would have foreseen all these modern expansions.

      --
      Escher was the first MC and Giger invented the HR department.
    35. Re:Foundation by Gr8Apes · · Score: 1

      Well of course you wouldn't use the same micro-code techniques. But just understanding the concepts involved would be applicable to any other system we commonly use today, just as long as you know the basic peculiarities of that architecture. Basic assumptions have changed from your 70s/80s sample set.

      --
      The cesspool just got a check and balance.
    36. Re:Foundation by oursland · · Score: 1

      And I learned all that on an old Intel 80386 long before touching my first microcontroller. Beyond that, 80386 architecture supports virtual memory, something the developer should be keenly aware of and isn't available on microcontrollers.

    37. Re:Foundation by Anonymous Coward · · Score: 0

      I'm not extremely well-versed in compilation techniques, but I remember reading an article a while back that talked about ASM-level hand optimization, while beneficial on Pentium-era processors, can be detrimental on superscalar, multi-core, and/or hyperthreading processors because you optimize out some modularization, in a sense "condensing" the code to run faster as a block but preventing the CPU from doing any appropriate optimization with that block that would have been possible if it had been left intact as simpler, but more redundant, code.

    38. Re:Foundation by TheRaven64 · · Score: 1

      For a good overview, take a look at Jakob Olesen's talk from EuroLLVM. Be warned, the talk contains a lot of simplifications (and is completely wrong if you're targeting anything like a GPU or DSP), but it's a good overview. For very recent chips and scientific workloads, it's also interesting that it often uses a lot less power (and is faster) to recompute intermediate results than to store them, if they won't fit in cache (sometimes even if they won't fit in L1 cache).

      --
      I am TheRaven on Soylent News
    39. Re:Foundation by vilanye · · Score: 1

      You need way more math than that.

      Discrete math and continuous functions are very important, far more useful than the freshman calculus courses CS majors have to take. Set, number and graph theory, cardinality and all the other fun stuff in discrete math is the foundation of computation.

      It is amazingly horrifying that so many programmers don't understand the actual mathematical definitions of functions, equality, tuples, closures, relations,etc. I think I am going to club a baby seal each time I read about how people think the relational model has to do with how tables relate to each other.

    40. Re: Foundation by Anonymous Coward · · Score: 0

      There are lots of times I'll choose a n^2 algo over a n ln n one.
      Maybe it's fast enough yet easier to understand.
      Maybe the hidden constants dominate for the range of n.

    41. Re: Foundation by Anonymous Coward · · Score: 0

      Superscalar, simd, out of order execution, branch prediction, hierarchical caches, micro ops, virtual addressing, rings, mmio, multiprogramming, logical hardware threads, c-states, floating point...
      I hope that wasn't a rhetorical question.

    42. Re: Foundation by Anonymous Coward · · Score: 0

      There are still plenty of areas where you can outperform a compiled obvious algo.
      Compilers are still bad at vectorization. And don't expect a compiler to be able to parallelize code well.
      Take a matrix multiply. Compilers won't generate optimal code from a simple c implementation. You'll need to hand vectorize and account for cache sizes and data dependencies.
      Although, it's probably better for my future career if few people recognize this fact...

    43. Re:Foundation by srussell · · Score: 1

      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.

      And I hear this a lot from developers who write buggy, inefficient code that fails under load. Ain't anecdotal evidence great? It's almost as good as straw man arguments.

      OP was talking about the fact that, when people don't understand the basic fundamentals of how computers work, they make poor design and coding decisions. Having a good understanding about what's going on under the hood, at all levels, is critical for a lead developer.

    44. Re:Foundation by lennier · · Score: 1

      But more to the point, the obsession with the declarative programming paradigm is one of the things holding programming back.

      Um, are you sure you don't mean the imperative programming paradigm? Imperative is "do this, then do that" - ie, C - and doesn't scale to parallel. Declarative programming - "this is what I want, I don't care how it gets done" is precisely what modern programming languages don't do, and what I reckon we need more of. Especially if your work involves describing complex interlinked data sets with no particularly well-defined types (hello Internet! hello Semantic Web! hello just about everything on your basic workstation desktop except for the low-level graphics code in your 3D games)

      IMO the high-water mark of declarative programming is Prolog embedded in Lisp - but show Prolog to the average C++/Javascript hacker and they'll look at you like you're from Mars. Where are my functions? Where's the curly brackets? What are these "predicate" things? What do you mean, it works backwards as well as forwards? Logic what?

      We lost two generations of programming advancement when the AI Winter crashed the Lisp scene. Granted, the Scheme/Common Lisp civil wars didn't help. But we could have had much nicer things to program with than C++. We still could, if we cared.

      Racket's semi-okay, I guess; it would be better if it didn't throw a whole bunch of multi-language complexity in your face right away, though. And unfortunately, its implementation of Prolog (actually Kanren) is Not Really Sufficient for the stuff I want to do, owing to massively too busy syntax. Ironically, the stuff I want to do which turns out to be really hard to do in most modern langauges is text adventures.

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  91. 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.

  92. Re:I can think of one that Steve Jobs disagreed wi by basecastula+ · · Score: 1

    www.RosettaCode.org

  93. Re:I can think of one that Steve Jobs disagreed wi by real-modo · · Score: 1

    First time I've ever done this, but ... me, too.

  94. Your biggest limit is your creativity by bug1 · · Score: 0

    One of the most significant things i learnt as a programmer after 20 odd years is that being a good programmer isnt enough, you have be capable of design as well.

    Knowing only syntax allows you write functional but unmaintainable code. Knowign only design allows you to beatiful but disfunctional code. You need both.

  95. Defensive programming. by Ihlosi · · Score: 1
    Keep your code in a way that makes bugs show up obviously and be easy to track down.

    Nothing worst than having a fairly catastrophic bug (e.g. buffer overflow) that only degrades program performance slightly, but does not lead to obvious misbehavior.

  96. 101 !! by Anonymous Coward · · Score: 0

    GONG !!

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

    1. Re:That list is stupid... by Anonymous Coward · · Score: 0

      >implying that unit tests are genuinely useful.

    2. Re:That list is stupid... by Anonymous Coward · · Score: 1

      10. Optimise for understandability/maintainability ahead of performance ... unless performance is essential.

      Also, as one other poster mentioned above, distill your implementation until it is as simple as possible. This includes the size of the module/object you're writing.

      My general rule of thumb... if it "feels right", it most probably is. When I start to feel "confused" or "uncertain" or similar, I know I need to stop and think about what i'm doing.

      warning: I've been in Project Management for about 10 years, but I still keep my fingers dirty ... and I love the misguided postings on Slashdot that all managers are idiots and all engineers are beyond reproach ;)

    3. Re:That list is stupid... by Anonymous Coward · · Score: 0

      WTH 9.? What does open source have anything to do with this? The license depends on the product, it has nothing to do with programming. Besides, plenty of people have gotten jobs, because they have an open source project and they've been able to show their skills, so 9 is definately untrue.

    4. Re:That list is stupid... by gigaherz · · Score: 1

      Note that I said your algorithms, not just any piece of code. There's unit testing, and then there's paranoid unit testing.

    5. Re:That list is stupid... by Anonymous Coward · · Score: 0

      7. Choose the IDE with the better debugger.

      Holy shit! I've now met the other person in the universe who knows this! How you do?

    6. Re:That list is stupid... by gigaherz · · Score: 1

      I really wanted to get it to 10... and I said NOT SO GOOD, not that it doesn't work. Proprietary software is more lucrative, with exceptions.

    7. Re:That list is stupid... by gigaherz · · Score: 1

      I'm fine, thanks. I have a job at a small start-up (spin-off from a university lab). It doesn't pay very well but it's enough for me, and it's nice people and -- generally -- I'm able to write code the way I like, since I'm mostly the only one working on a project. The downside is that I don't have anyone else to review my changes and correct my logic mistakes and typos.

    8. Re:That list is stupid... by abies · · Score: 1

      Kudos from me for writing "Write unit tests for your algorithms" instead of "Write unit tests for all your code". I'm so tired of people writing unit tests for most useless single-line methods, pretending it is helps with refactoring and documentation and showing their 95%+ test code coverage as a scout badge. Better to spend same effort doing _proper_ unit tests for the non-trivial parts of the code, covering real edge cases, not only all code paths.

    9. Re:That list is stupid... by Anonymous Coward · · Score: 0

      10. The solution may be as complex as it needs to be but the implementation should be as simple as possible.

    10. Re:That list is stupid... by gigaherz · · Score: 1

      Thanks. That was the idea.

    11. Re:That list is stupid... by gigaherz · · Score: 1

      Nice one. Could be reduced to: 10. KISS your code.

    12. Re:That list is stupid... by holophrastic · · Score: 0

      1. never be consistent. every task is totally different.
      2. name things in a way that makes sense to you in relation to the other things around. No one cares if it's proper.
      3. put the code where you want it. that's where it belongs.
      4. never write comments. learn to read code. english isn't any easier to read.
      5. never use existing libraries when you can write your own.
      7. don't use an IDE at all. write a platform that doesn't require debugging at all.
      6. never test your algorithms. write self-testing algorithms instead.
      8. there are no guidelines outside of school. and school just makes them up for grading purposes.
      9. open source is terrible for the world. but it's a great way for a programmer to take working code and re-write it for themselves.

    13. Re:That list is stupid... by Anonymous Coward · · Score: 0

      Open-source is good for the world, but not so good for your wallet (yet).

      Why not? Most software is developed as one-of-a-kind for a specific company footing the bill. If you don't let them have the source, you're, in my humble opinion, a scumbag.

    14. Re:That list is stupid... by gigaherz · · Score: 1

      1. never be consistent. every task is totally different.

      I meant within the same codebase.

      2. name things in a way that makes sense to you in relation to the other things around. No one cares if it's proper.

      Others have to be able to read your code also.

      3. put the code where you want it. that's where it belongs.

      See 2. Also, if it's in the wrong place it will have more dependencies.

      4. never write comments. learn to read code. english isn't any easier to read.

      Bullshit. In many cases, it's not easy to understand the PURPOSE of an algorithm, even if it's easy to read.

      5. never use existing libraries when you can write your own.

      This is just trolling, isn't it?

      7. don't use an IDE at all. write a platform that doesn't require debugging at all.

      Yep, definitely trolling.

      6. never test your algorithms. write self-testing algorithms instead.

      I'd be glad to know how that would work.

      8. there are no guidelines outside of school. and school just makes them up for grading purposes.

      See 2.

      9. open source is terrible for the world. but it's a great way for a programmer to take working code and re-write it for themselves.

      See 5.

    15. Re:That list is stupid... by gigaherz · · Score: 1

      The company that requests the one-of-a-kind software will want EXCLUSIVE access to the source. If it's open-source, they will refuse to pay as much.

    16. Re:That list is stupid... by holophrastic · · Score: 1

      not trolling. just a totally different mindset and life-style. I also meant within the same codebase -- different tasks, different techniques. Others can learn to read better. my code has no dependencies, so it doesn't matter where I put it. That's a big part of no IDE, no existing libraries, and others learning to read. All ym code is totally movable.

    17. Re:That list is stupid... by Anonymous Coward · · Score: 0

      Ok with 4, 5 and 6. Rest is to vague to be useful. 9 is just laughable...

        Your a kid and you want to learn programmaing : start at the simplest. Download and install Python and read the Zen. Your have nice guidelines and a simple and modern (I.e. feature complete) language to learn algorithms, datastructures and design patterns, and to train your methodology.

        Learn how to tackle a problem, by decomposing it,analysing and creating the solution bit by bit.

        install mercurial or git and learn the basis of version control.

        When you feel at home with python try C or something similar to learn about memory allocation.

        And at some point during all this install and USE a DB. they are fucking awesome.

        There : you are a programmer.

  98. Re:I can think of one that Steve Jobs disagreed wi by dentin · · Score: 1

    Actually, I have built a quicksort, and several kinds of hash functions and hash tables, from scratch. I've also built a FILE style I/O layer using sockets, an HTTP server, a BSD style NDBM replacement, and most recently, a high speed, memory efficient GUI text scrolling window class. All of these except the GUI module I did before I actually got a real job.

    Requiring only one or two of the easy things from that list is a perfectly reasonable entry requirement.

    -dentin

    Alter Aeon MUD
    http://www.alteraeon.com

    --
    Alter Aeon Multiclass MUD - http://www.alteraeon.com
  99. ADD by Anonymous Coward · · Score: 0

    ADD is good, I like ADD. Everybody should be using it!

  100. Re:I can think of one that Steve Jobs disagreed wi by SuricouRaven · · Score: 1

    It works if you switch the ordering:
    Good software development is to lego development as a chemist is to a cook.

  101. temporal and spatial locality by Anonymous Coward · · Score: 0

    temporal and spatial locality, and how your software maps onto hardware

  102. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 1

    Right - but if I catch a programmer ever actually implementing a quicksort by themselves though, they're fired. Because who knows - tomorrow they'll be thinking they can implement a database all on their own. That kind of thinking is the wrong kind of thinking. Unless you're looking at an academic career, where "error checking has been removed for clarity". No thanks, and good luck with that.

  103. As a mentor of junior engineers by Anonymous Coward · · Score: 0

    ... it baffles me how many of them (university or otherwise "prepared") don't grasp basic concepts like common and basic data structures (e.g. hashmaps, linked lists) and the situations where particular structures are indicated (i.e. performance characteristics, etc.) and basic logic structures (case statements, try/catch/finally, ternary operators) and basic vocabulary (method, parameter, instantiate, etc.).

    It's a monumental failure of the software engineering education system. How many carpenters get certified that don't know what a hammer and a chisel are? How many doctors graduate without a knowledge of a stethoscope and a reflex hammer?

    Fuck everything else. Let's start with making sure no one graduates or gets certified without that basic knowledge. Then we can worry about the next step.

    P.S.: The people I've been forced to mentor that don't know the above were not hired by me, and my recommendation was to terminate them immediately.

  104. Unicode by divec · · Score: 0

    should be more widely understood than it is. Even English-only programmers need to know enough to avoid security holes. You can't normally be sure you're writing safe software unless you know a little about Unicode. In this sense, it's like structured programming, and unlike most other things on the original list.

    --

    perl -e 'fork||print for split//,"hahahaha"'

  105. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Your first bit is covered by structural programming (subroutines and functions).

  106. Re:I can think of one that Steve Jobs disagreed wi by Captain+Hook · · Score: 1

    So you are saying programmers should just be able to stick existing code blocks together with the appropriate software glue, which would be the closest analogy to assembling an engine like a piece of IKEA furniture.

    --
    These comments are my personal opinions and do not necessarily reflect the opinions of the other voices in my head.
  107. Re:I can think of one that Steve Jobs disagreed wi by grouchomarxist · · Score: 1
  108. Homoiconicity by Anonymous Coward · · Score: 0

    The idea that code is nothing but a data structure

    1. Re:Homoiconicity by maxwell+demon · · Score: 1

      And data structures are nothing but code.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  109. 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.

  110. Lexical Scoping by Required+Snark · · Score: 1
    Lexical scoping unifies control flow with variable lifetime definition. It also integral with the modern set of control primitives: if/then/else, for, do/while, do/until, case and try/throw/catch.

    Lexical scoping makes analysis easier for both the coder and the compiler.

    Before lexical scoping languages like BASIC and FORTRAN were often nightmares of spaghetti code. If you've never experienced this you don't know how horrible it could be. Early C lacked it, but it didn't talk long to extend C to fix this mistake.

    Since lexical scoping has become so common, there is no excuse for a language to omit it: I'm pointing at you, PHP and JavaScript. The fact that these two extremely common languages don't have lexical scope indicates a real failure in computing practice.

    In some fundamental ways computing has made no progress. I think that this situation relates to the general unreliability of software and the problems that plague software development. When obvious best practice is not adopted, it should be no surprise that the same mistakes keep being made over and over again.

    --
    Why is Snark Required?
    1. Re:Lexical Scoping by vilanye · · Score: 1

      Early Python lacked it as well.

      That is why 90% of python code is nothing but self

  111. Re:I can think of one that Steve Jobs disagreed wi by steelfood · · Score: 1

    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.

    'nuff said.

    It's problem solving. It's breaking a problem down horizontally (layers) and vertically (features). It's reducing problems into the fundamentals and solving those first. It's prioritizing. It's learning what needs balancing, how to balance it, and why.

    Programming is as much a work of art as it is an engineering exercise. Just like when creating a building, the architect and engineer have two diametrically opposing responsibilities, so does creating a program have the same challenge between design and engineering. Programming is figuring out how to walk that line between form and function.

    --
    "If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
  112. Best programming advice by Anonymous Coward · · Score: 0

    Don't re-invent the wheel. But if you must, at least try to improve upon it.

  113. Assembler by mrthoughtful · · Score: 1

    I know this sounds strange at first, but before I learned assembler, I didn't really understand what was going on in the heart of the machine. If I were to introduce a programme starting from fundamentals, it would start with an easy assembler (eg Z80, 68000, PIC); this itself introduces the fundamental operations of programming, including assignment, de-referencing, LUTs, stacks, etc.

    The next progression would be 'C'. This abstracts out the hardware dependency, but keeps the underlying structure.
    This assists with more complex algorithm development, but also shows how the approach to programming developed from assembler.

    Following that, I would move onto one of the modern 'C' successors. Personally I use C++, but maybe objective-C would be better.

    It totally depends upon your purpose though.. If you want to cover UI/UX stuff, then you should think of a different approach. If you want to cover databases, that's something else again.

    But in programming - IMO, the most genuinely 'useful' ideas are things like the registers and special registers that make up a CPU.

    --
    This comment was written with the intention to opt out of advertising.
  114. Stack... by Anonymous Coward · · Score: 0

    If you got a hammer, everything looks like a nail.

    If you got a stack.....

    Ever heard of stack based databases? Yup they did (and probably still do) exist. But if you use them for the wrong purpose, you will get some performance problems. Throwing more iron(hardware) at it is not the right solution.....

    1. Re:Stack... by K.+S.+Kyosuke · · Score: 1

      Ever heard of stack based databases? Yup they did (and probably still do) exist.

      Never heard of them. Why would you use a stack for a database when these require random access by nature? Or are you just confused about the nature of polyFORTH projects?

      --
      Ezekiel 23:20
  115. Algebra by Anonymous Coward · · Score: 0

    and orthography in most cases.

  116. Humility by PhilHibbs · · Score: 1

    Of the 8 virtues of the great programmer, humility is the most important. And I'm always right about that sort of thing.

  117. Divide and conquer. by Anonymous Coward · · Score: 0

    Pretty much every efficient algorithm is in the O(n lg(n)) complexity class, and almost always this is due to a "divide and conquer" approach. The most important algorithm analysis tool is the Master Theorem, again because of its relation to divide-and-conquer algorithms.

    Quicksort is divide-and-conquer with basically random quality of the divide, (base 2 non-natural) Mergesort is divide-and-conquer with perfect quality of the divide, Insertion sort is divide-and-conquer with worst quality of the divide.

    Nowadays one can't overstress the impact of sequential memory access patterns over random access patterns, and the large impact of writes: even if it makes your algorithms longer, don't let them write back anything that is known to be already there.

    Don't maintain what you can reconstitute: when sorting a doubly-linked list, just sort the forward links. You can reconstitute the backward links with a separate pass or in the last step. Of course, this conflicts with the "write only changed data" advice, but usually there is more movement than non-movement when going through all sorting stages.

    The favorite data structure of the "MSc" "computer scientist" is the linear list. Now the linear list is a good starting point for perfect divide-and-conquer algorithms like mergesort. But for sloppy divide-and-conquer you are usually better off with trees or heaps. And the "computer scientists" have a fondness for using "worst-divide and conquer" algorithms with associated costs. And "buy bigger iron" does not help all that much against O(n^2) or worse.

  118. Re:I can think of one that Steve Jobs disagreed wi by mcvos · · Score: 1

    They don't have to be able to write a compiler, but they should be able to write code.

  119. Down-Top by advid.net · · Score: 1

    the top-down approach results in code which is easily understood, elegant, efficient, robust, and maintainable

    I often used (or resort to) down-top approach with good result and - maybe surprisingly - elegant and maintainable code.

    My last code was a Python puzzle solving program.
    I tried first the top-down analytical approach, and it seemed quite complicated and convoluted. I though of a complex data structure, to be refined.

    Then I decided to code with down-top approach, build from small efficient task that I would need later for the job to be done, along with some test functions.
    The data structure boiled down to a very simple one when I figured out that I could use recursion instead of managing a heap.
    Finaly I had all the bricks I wanted, to finish the program. I just needed to figure out the main algorithm, I was worrying that it could be the tough part, but a miracle happened: the main function was a mere 4 lines, very clear and consise. They just popped out of my mind. What ? Is that all ? And guess what ? Yes, the puzzle solving was working right on the first time I ran it.

    So I would rather say that when you have some good practices in programming, don't look upon Down-Top approach with contempt.
    That's often a good way to go.

    1. Re:Down-Top by mrchaotica · · Score: 1

      I think you mean "bottom-up."

      --

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

    2. Re:Down-Top by kermidge · · Score: 1

      In 1981 a very smart friend told me that for small projects - games and simple business applications, for instance, that a helpful approach was:

      top down
      inside out

      along with check input and trap errors

      all stupidly simple enough that even I could do it; for the few things I did I got reasonably clean, clear, maintainable stuff

  120. Divide and Conquer by Anonymous Coward · · Score: 0

    Divide and Conquer - not exclusive to programming but essential basic idea

  121. "Good enough" by Pikewake · · Score: 1

    A variant on the KISS theme:
    If you deliver something that is better than "good enough" you're wasting your time and your clients' money.
    You are not an artist. Every piece of code you write does not have to be a masterpiece.
    Just because you think you can write a better version of someone else's code, don't bother if the code works.

  122. confusion.. by Meerathakur1990 · · Score: 1

    i also want to know the best programming field in India.

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

  124. Good practice: think before coding by Anonymous Coward · · Score: 0

    Here's a good practice: You should think through your logic, and have a clear idea of how the code should behave, before you start typing. Maybe write the comments before writing the code.

    Once I inherited code from someone, whose author told me that he didn't know if a particular variable in the code was needed. (I ended up re-writing it.) If you think before you type, your code will be much easier to modify.

    That's a good practice for a job interview, too. Once in an interview, I was told to write a C function on the whiteboard. I didn't want the interviewer to think I was a slow programmer. So I wrote code on the whiteboard without taking the time to think it through. He told me that was wrong. I then threw some other code on the whiteboard really fast. That was wrong also. Etc. If I had thought out the problem before writing code, I might have gotten the job.

  125. Edmund Kean by Kazoo+the+Clown · · Score: 1

    "Complexity is easy. Simplicity is hard."

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

  127. Documentation? (Il)Literate Programming by WillAdams · · Score: 1

    Why doesn't Literate Programming ever make these lists?

    http://www.literateprogramming.com/

    Sad that fewer people own /read Literate Programming (Center for the Study of Language and Information - Lecture Notes) by Donald E. Knuth (Jun 1, 1992) than TAOCP.

    --
    Sphinx of black quartz, judge my vow.
    1. Re:Documentation? (Il)Literate Programming by Anonymous Coward · · Score: 0

      See also here.

  128. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    At least she is capable of communicating without resorting to insults. Yeah, we get it, you were the smartest person at school but no one cared and you were bullied anyway, but with a 5-digit user ID you should really be over that by now. Get a gym pass if you want a punching bag. Intelligent people disagree sometimes, it doesn't mean one of them is an idiot, and insulting people doesn't make you look like the smartest guy in the room anyway.

  129. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    It exists. It's called "The Art of Computer Programming" by Donald Knuth.

    Listen, software development isn't the same as throwing some lines of code together. A lot of web developers seem to get away with it for a while, but it results in the kind of code that gets more and more expensive to maintain as time goes on. But it's great if the expected lifespan of the company is shorter than the time it takes for the code to become unmaintainable, which is true for most web companies.
    It's also not the same as assembling some components into a program. In that case you're just configuring stuff, and yes, you don't need to know quicksort for that. You're also not a software developer.

    A lot of people on this forum seem to have this weird concept of what software development is about, but that's why the salary range for a software developer is as big as it is.

    There's not much point in copy-pasting an algorithm into your code - you need to apply it to the data structures and the logic in your application. In those cases where it is that simple, it's already in the standard library of your favorite programming language, you don't need to go looking on the web for it.

  130. m2c by YoungManKlaus · · Score: 1

    3 rules
    - stay interested in anything and everything
    - strive for simplicity, clarity, beauty, transparency (that also includes your progress when you develop stuff for someone)
    - concepts, not implementation details (eg. understand OOP, not what the exact syntax for defining an object in language X is)

    everything else is just details. Nobody should care about Language A vs. Language B or SQL vs. NoSQL as long as you pick what fits.

  131. Re:I can think of one that Steve Jobs disagreed wi by Bing+Tsher+E · · Score: 1

    Lego development requires one HELL of a good knowledge of tooling design. I suppose somebody knows where the parting lines are on the Lego blocks, but they sure aren't noticeable. The interchangeable nature of all the blocks built in like forever shows that the Lego developer's skills in material science are also awesome.

    The tooling design of most toy components is 'shrug,' make it all fit together. Particularly cheap toys. Lego was not developed like that.

  132. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Find me a mechanic that can build a V8. They don't have the metallurgy, the physics or the engineering to do it. That was a ridiculous example, and I wouldn't want to work for you.

    That's an interesting way of looking at things, I suppose. By that definition of "build," a home builder would need a proper background in molecular biology (since they need to know the biological nuances of various flavors of wood), sufficient logging and milling technique (they don't grow in a 2x4" form factor, after all), architecture, geology and seismology (your home is only as good as the ground you build it on), glassworking (I'm assuming there will be windows), HVAC, interior decorating, metallurgy (nails, knobs, outlet box enclosures, etc.), culinary arts (for that fresh bread smell when you go to sell it), ...

  133. Use the right tool for the job by Anonymous Coward · · Score: 0

    This list is the best comment I've read here, but I think the point of using the best language / libraries for the problem domain you are working in is essential to include as a "useful idea" if not an essential starting point.

    E.g. you should never write high level business logic in something like C or Python.

    Now you just need to decide correctly which the best language / libraries are, so let the fun start on that debate.

    As an aside, the real essentials in the list above are the even numbered ones (OK, let's include 5 as an honorary even number here to see where I stand)

  134. My shortlist by Alkonaut · · Score: 1
    • - Structured programming.
    • - Programming paradigms and their differences and benefits (functional/procedural/declarative/imperative/object oriented), how to choose language/paradigm depending on problem, and useful patterns and strategies for each.
    • - Type systems (weak/strong/dynamic/strict). Drawbacks and benefits
    • - Basic development methodology (version control, testing, error handling, debugging, ALM, documentation).
    • - "Data structures and algorithms" i.e. basic discrete math, complexity theory, data structures and their algorithms.
    • - Some low level knowledge: basic understanding of how a computer works, how memory/cache/file systems and OS:es work. What's two's complement? What's epsilon for IEEE 32 bit floats?
    • - Basic computer security, encryption and hashing.

    I think databases, "The unix philosophy" etc. are more controversial and should not be on the essential shortlist.

  135. Almost a complete list by Murdoch5 · · Score: 1

    I would say then do that list in Java, C and ASM.

  136. Re:I can think of one that Steve Jobs disagreed wi by dwpro · · Score: 1

    I think this is a prime example of the vastness of the software development field. When I first started coding, the same argument was made about being able to write a compiler, and yet I'm expected to know this and a litany of emergent platforms, patterns, languages, and development environments. Lets face it, 95% of development is lego binding, and most of the time the pieces just have to fit together well enough. That modest performance gain you will get from your intimate knowledge of sorting algorithms will be much less important than whether your code is functional, concise and maintainable for the majority of programming jobs out there.

    --
    Millions long for immortality who do not know what to do with themselves on a rainy Sunday afternoon. -- Susan Ertz
  137. Learn to use a gun by Anonymous Coward · · Score: 0

    Maybe even get a gun license.
    Because some people have no respect for what they create and who has to suffer what they created.
    You can solve these issues by shooting them through the head twice. Second time just to make sure they dont get back up.

  138. Indirections ! by herve_masson · · Score: 2

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

    (David Wheeler)

    So true....

    1. Re:Indirections ! by phantomfive · · Score: 1

      .......except the problem of too many levels of indirection.

      --
      "First they came for the slanderers and i said nothing."
  139. Re:I can think of one that Steve Jobs disagreed wi by LordKronos · · Score: 1

    "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. ...
    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'm sad to learn that, by your standards, I'm not currently a programmer, but merely a hack just out of high school, as I couldn't write a quicksort to save my life. Ironically, though, 20 years ago, when I WAS just out of high school (and WAY less experienced/skilled), I apparently was a programmer back then because I could and did write a quicksort at that time.

    Or, maybe you're just really bad at expressing yourself.

  140. Think by Anonymous Coward · · Score: 0

    Do not reach for your keyboard - especially if you are in a hurry
    Step 1 Think about the problem
    Step 2 Think some more about the problem
    Step 3 Analyze the problem
    Step 4 Review the specs one more time - if something is really hard - redefine the problem and go back to step 1.
    Step 5 Design the solution
    Step 6 Review steps 1-5 with someone else
    Step 7 Revise Steps 1-5 if necessary
    Step 8 Start coding.

    Steps 1-7 are where great programmers are born.

  141. Re: I can think of one that Steve Jobs disagreed w by O('_')O_Bush · · Score: 1

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

    Library sorts are always faster than what you would implement on your own, which makes knowledge about sorts relevant to 90s era code, but completely obsolete now.

    I've been writing code as a profession for the past decade from everything ranging from uControllers, cellphones, and SBCs to large (60+ server, each with unique functions, meshing multiple languages) ship control/interfacing systems.

    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.

    --
    while(1) attack(People.Sandy);
  142. 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.
  143. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

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

    Amm... you're saying fixing a custom engine is simpler than building an existing one? In most software projects, unless something you're fixing is tiny, it's almost always easier to just roll your own.

  144. Good code by Max_W · · Score: 1

    is well formatted code.

    1. Re:Good code by TheSkepticalOptimist · · Score: 1

      not true, I have seen some truly beautiful pieces of shit in my experience.

      Focusing on format and syntax is a misguided effort that simply hides problems with logic and intent. When a company focuses on coding style, you know you are headed down the wrong path. I have seen elegantly written and "well formatted" code that simply does not work past a few limited test cases.

      Saying good code is well formatted code is like telling someone that a good author needs to have beautiful handwriting. Just because someone writes with calligraphy does not make them Shakespeare or even a JK Rowling.

      --
      I haven't thought of anything clever to put here, but then again most of you haven't either.
    2. Re:Good code by Max_W · · Score: 1

      Well formatted does not mean beautifully formatted. There are principles and rules of formatting. There should be consistency, rigor, character, attention to details.

      One should see and read well formatted code as if from an aircraft, from above. An error or deficiency becomes obvious from the first sight.

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

  146. As an MBA I can say with absolute certainty... by Anonymous Coward · · Score: 0

    ..that the only useful idea in programming it is to outsource somewhere they pay $1 a day!

  147. Too Big. by jythie · · Score: 1

    To ask what the useful ideas are in 'programming' is like asking what the useful ideas are in 'writing'. There are a few very high level things like checking your work and think things through, but outside that the advice quickly becomes domain specific. Programming is explaining things to a machine, and thus what you are explaining and what kind of machine matter.

  148. Bring back the GOTO by Anonymous Coward · · Score: 1

    GOTO has a bad rap. The flexibility to jump to any location in code unconditionally with no requirement to return is a sadly lost benefit.

    Code would be a lot cleaner if everything didn't have to be a freakin' function of something else.

  149. Uncontroversial Considered Harmful by Anonymous Coward · · Score: 0

    Some (many?) of the greatest advancements in human knowledge were controversial at some point, and the people promoting them were often ridiculed. What makes you think that we are immune to that effect today in computing?

  150. Subroutines by oldCoder · · Score: 1

    The single most useful idea in software development is the subroutine. It's what enables every thing else.

    There are programming languages that get this wrong, although not recently.

    --

    I18N == Intergalacticization
  151. A few more key ideas by Organic+Brain+Damage · · Score: 1

    1. 99.999% of end users/customers do not understand software design documents and never will understand software design documents. So we must prototype rapidly into existence so we can get useful feedback early and often directly from the people that will use the tools we build is important.

    2. I rarely optimize for performance. But when I do, I always measure first, record the results, and after each change, measure again. Use a stop-watch, a routine you build yourself, or a fancy-pants Profiler that tells you how much time each line of code took, but never ever optimize without measuring.

    3. Software Engineers/Programmers are usually religious fanatics when it comes to languages and tools. Almost any problem can be solved in almost any language. If you're on a project with someone who loves Java, they'll write better code in Java. This idea extends to OS choices. If someone loves the Mac OS, their programs written on the Mac OS will be much better than anything that programmer would ever write on Windows or Linux. 4.

    1. Re:A few more key ideas by Hognoxious · · Score: 1

      99.999% of end users/customers do not understand software design documents and never will understand software design documents.

      Totally true.

      So we must prototype rapidly into existence so we can get useful feedback early and often directly from the people that will use the tools we build is important.

      The dilemma with that is that either it looks like a prototype (which completely puts them off - OMG, it's the wrong colour!) or you spend inordinate amounts of time making it look good which is bad for two reasons:

      (1) it's wasted effort because when the functionality changes you'll have to do it again (painting a fender before knocking the dent out; plastering a wall and then knocking it through to move the door)
      (2) if it looks finished, somebody will assume it is finished. Best case there'll be griping about the "unnecessary" delay of actually installing the guts; worst case some PHB decides to ship the demo.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  152. Goto by gr8_phk · · Score: 1

    IMHO BASIC was a great first language because of the goto statement. Let me explain why. Lots of people are familiar with or can easily understand a flowchart. By numbering the lines in a purely imperative language, people could easily get a machine to do something by laying the instructions out in order. Goto allows that linear list of instructions to be branched in exactly the same way a flowchart does (check condition, go here). Only after learning very simplistic imperative programming should one say "goto is evil, use structured programming". It's helpful - if unfortunate - to see the downside of goto in order to appreciate better code structure. But I remember there is more forethought required to use structured constructs to write some kinds of code. In the beginning I think it's important NOT to introduce abstract concepts (structured programming, OOP, complex data structures, etc) until the student has groked the fundamentals of getting the machine to do what you want. If all you've got is a hammer, everything looks like a nail, but then you will also have an appreciation and immediate understanding of the usefulness of power tools.

    So I'm only slightly joking when I say "goto", but the point is that every abstraction looks like wierd arbitrary stuff you have to learn until you know enough to appreciate it's usefulness, at which point it's easy to learn because it does something you perceive as useful. Abstractions raise the height of the learning curve, but should not increase its slope or it shall look like a wall.

    I'm still trying to understand why the latest craze is functional programming. From where I sit it's a bunch of intellectual self gratification. Programs manipulate data - why shun mutable state? Jumping through hoops (apparently something called monads) to have mutable data is absurd - that's what computers DO. Or as XKCD put it...

    1. Re:Goto by Anonymous Coward · · Score: 0

      Functional programming in complete purity is IMHO useless. But so are most paradigms when put into the extreme (unfortunately for every paradigm there are those who think everything should be done following that paradigm). But functional programming when applied to just the problems where it is useful is, well, useful.

      Ever heard about Google's MapReduce algorithm? Well, it's just Functional Programming 101.

  153. Re: I can think of one that Steve Jobs disagreed w by HornWumpus · · Score: 1

    On the flip side of that is the hacks that sort by stuffing their data into a control, setting it's 'sorted' property to true, then reading it back out.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  154. There are none by TheSkepticalOptimist · · Score: 1

    If you want to inspire a young student with software development, tell them to find a way to fix software development.

    The problem I am seeing today is that in spite of all the years we have been writing code, stuff is getting less reliable and stable and overall, I find the user experience of most technical things today appalling.

    Obviously nothing that is being applied towards software development is working.

    I find the Internet today to be worse then it ever has been. For instance I have a 50mbps connection and yet frequently I can't even load google.com because my browser tells me the connection is lost. How can today's broadband be even more unreliable then when I used to browse the internet using dialup?

    I have a new Logitech remote that will freeze and not respond about 10 times an evening, in spite of about a dozen firmware updates applied already for it.

    Most of the features of my "smart" TV are useless.

    Games and Apps on my Android tablet or iPod Touch crash frequently and are updated regularly.

    The most "advanced" OS on the planet, OS X, hangs on my every several days forcing a reboot.

    There are rampant problems with a general lack of security of all digitally connected things. iOS 7 already has had 2 patches to fix security issues.

    And I won't even touch all the issues that came out of Redmond over the years.

    So there is a real big problem in software development, and it comes from people assuming they know how to write good software, but then, lets face it, good software is NOT being delivered today.

    There needs to be a fundamental paradigm shift in how we develop software. The idea of releasing beta's, patching frequently, or Google's approach to update on a daily basis is no longer acceptable. There is no reason why "flawless" cannot be an objective to describe the user experience of using device or application. There is no reason why we cannot write flawless code. We have more processing power on our phones then we used to have on a supercomputer from 30 years ago, why can't we harness that power to develop a software process that produces zero bugs?

    So, if you truly want to inspire a new generation of coders, forget about trying to entice then with current concepts in software development. Show them all the current problems with software development and then get them young minds thinking about solutions for a new era where software bugs and defects simply don't occur.

    --
    I haven't thought of anything clever to put here, but then again most of you haven't either.
  155. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Breaking Bad reference?

  156. I just simply disagree by holophrastic · · Score: 1

    You won't find any such list. I've made a career out of shunning all such "popular" attitudes. The more consistent the attitude, the more obvious the benefits to breaking away from it.

    Way back in university, in CS, the prof spent a day teaching sorting algorithms, as all CS profs do. The conclusion was that you can't sort any faster than O(n,log n). Which made it all the more confusing when I asked him what I was doing wrong because my home-grown sorting algorithm runs in O(n).

    Guess what. My puny zero-experience had written a sorting algorithm that really is O(n), and simply isn't taught in school. It's not taught as a standard sorting method purely because it depends high memory requirements and known a data range.

    Put together your list. Get everyone to follow/teach/learn it. I'll make a living out of defying it when clients get frustrated that the industry seems to prioritize it's own principles over the actual business needs their clients.

    I don't test. I don't allow database transactions. I refuse version control. I don't document. I don't write specs. I don't do garbage collection nor control. No complexity analysis, nor XML, nor functional programming nor object oriented programming. I type with a keyboard, but not with my variables. And, as we said before, my sorting algorithm is faster than quicksort.

    Make your list. Then find out how many businesses consider such lists to be purely academic. Your "master programmer" teaches programming. He doesn't run a business.

    1. Re:I just simply disagree by iggymanz · · Score: 1

      so you don't have general purpose sorting routine, and would make a terrible code due to your admitted lack of discipline. Thank you for proving the article's concept

    2. Re:I just simply disagree by neminem · · Score: 1

      > "My puny zero-experience had written a sorting algorithm that really is O(n), and simply isn't taught in school. It's not taught as a standard sorting method purely because it depends high memory requirements and known a data range."

      I can give you a sorting algorithm that's O(1). It just requires that the list is already sorted. :p

    3. Re:I just simply disagree by holophrastic · · Score: 1

      The article never says that discipline is required for success.

      And I never said that my sorting routine isn't general purpose. It covers all of the purposes that I've ever encountered in twenty years of business.

      It doesn't cover the needs of the curiosity rover on jupiter. But, interestingly enough, that's never been a requirement of any of my clients.

      I solve the problems that my clients have. I specifically do not solve the problems that my clients do not have. Welcome to optimization -- of my life.

      Enjoy your academic exercise. You'll find that's all it is.

    4. Re:I just simply disagree by holophrastic · · Score: 1

      Yeah, I don't require the list to already be sorted. I just require it to be of quantifiable values -- you know, like just about all of business precision. It's not scientific precision at all.

      Although, O(2n+1) would allow me to handle scientific precision, but it would require some pretty eroticly illegible code to do it. Oh yeah, and a reason for doing so.

    5. Re:I just simply disagree by neminem · · Score: 1

      You know that O(2n + 1) = O(n), right?

    6. Re:I just simply disagree by holophrastic · · Score: 1

      Actually, and here's where you're in the real world, O(2n + 1) == O(n) is true, but O(2n + 1) === O(n) is very much false.

      Unlike the first O class, the second points out something very important. That "2" and that "+1" can require huge amounts of code, advanced mathematical principles, and enough computational resources that it make all real-world sorting efforts incredibly slow. So sure, it may be just as fast on lists of a billion elements, but it's still way slower on lists of a million elements.

      Think about it. My first pass would only be assessing each element once, but it can take a minute per element to deduce what I need to deduce.

      And that's not even my world. In my world, the amount of time that it'll take me, as the developer, to figure, write, and test that code might take a week. All the time saved by that algorithm over a simple quicksort might me one hour of sorting per day. So it'll take five months before my time was worth the computer's time. And in the end, paying me for a week isn't as good as spending that money on a little more computer to handle this sorting alone.

      So it's not worth it in practice. No matter how theorhetically sound it is.

      Welcome to academic exercises.

    7. Re:I just simply disagree by iggymanz · · Score: 1

      no, I make good coin with many of those academic principals, and more importantly work with large teams on large projects. your way doesn't scale and doesn't allow maintenance.

    8. Re:I just simply disagree by holophrastic · · Score: 1

      My way certainly doesn't scale with many developers working on one task. That's because in my world, many developers on one task doesn't work. To be clear, that's not true of other industries, but in my industry it's certainly true. So my systems would fail miserably if more than three developers were to work on one task independently together. For business reasons, my actual max is two developers on any one task; any more winds up requiring long spec documents signed by the client in-advance, which completely ruins any time and cost savings. And that's why I've developed my platform to rid myself of most of the efforts that require large development teams -- testing, debugging, multiple versions, staged releases, mirrors and non-live development, etc.. I discovered that when all of that is eliminated, large teams are useless.

      Maintenance, however, is a totally different story. My way has way better maintenance. I've put code where I want it -- not where it "should" be. That means I put interactive code together. For larger more long-term projects, I organize code to actually prioritize maintenance -- one business feature is one file, for example. For smaller shorter-term projects, I deprioritize maintenance -- which won't wind up being required at all -- and I instead prioritize injection points or visual ideals or speed of development.

      That's really my point. By being able to choose what I prioritize -- maintenance, upgrades, enhancements, security, safety, testing, reporting, visuals, connectivity, etc. -- I can form my code around a client's requirements. And by raising that resolution way beyond the level of the project, to the level of the feature, I can separate project parts based on their usage, vitality, longevity, or, and here's the kicker, profitability to me and value to my client.

      The focus is to solve problems with computers; those problems aren't supposed to be fabricated academic problems; they are real-world client problems. I don't care about the "proper" way of doing things. Like you said, if you're prioritizing large development teams, then you're solving your internal problems, not your clients' problems. You need to balance those two, and the client is only paying for one of them.

    9. Re:I just simply disagree by Hognoxious · · Score: 1

      I'm sure that for every person who's made a career doing what you do, there are ten who've made a career of cleaning up the mess left behind.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    10. Re:I just simply disagree by holophrastic · · Score: 1

      Actually, it's the other way around. I didn't start this way. But I kept getting brought into projects where the procedures and policies for getting things done were bigger than the things actually being done!

      Take a big huge web-site, for example. A proper business-class web-site, full on-line customer application. A listing page, listing widget prices. Two changes please. Make all widgets of type A show their prices in red, instead of blue text. Show a 50% discount for any logged in user living in Florida.

      To do so in that world was hell. They had to work in a non-live duplicate. They had to go through QA. They had to go through version control. They had to merge conflicts. They had to push mirrors. They had to script database structure changes. They needed all of the infrastructure of duplicate servers and development environments. They had to document the change.

      It's a real-world, real-time business. They make these sorts of minor changes every month. It's a minor change to them, because in their business it's easy to discount stuff and it's easy to change colours. It was major for their development team because now it required user logins, and different caching, and logic where there previously wasn't.

      So they had me rebuild it all in my way.

      Now, those types of drastic-to-code, simple-to-business are now simple-to-code. Code is now matched to business. simple-simple. difficult-difficult. My clients are fine with me making the coding difficult when their business side is difficult. No one cares that the site needs more money to handle ten times as many visitors even though other platforms don't. It's hard for them to get ten times as many customers, and when they do, they'll throw money at me.

      So now, those types of changes get done on the live site, public or hidden, in real time, in seconds, with zero QA, zero testing, all with the client on the phone. We tweak it twenty times during a ten minute phone call. They pay the bill. Everyone's happy.

      So my question to you is this: when a client wants to make a functional change to their public web-site, can you do it with them over the phone within a 30-minute call? If you can't, you simply don't get these clients. And these are what make my business what it is -- talking to clients. That's the point. I'm not faceless. I'm the guy they turn to when they want to experiment with their business -- in real-time.

      No spec. No quote. No proposal. No days. No testing. No mirroring. No pushing. No version conflicts. No contractors. No middle-management. No junior programmers.

      One phone call. Ten minutes. Done. And I get paid by the value of that feature to the client's business -- plus the business-benefit of having it done in real-time.

      And honestly, screenstyle="color:model.type.map(a,red,blue);" really doesn't require more than 30 seconds. and if human.coordinate.province eq florida then math model.price / 2 else model.price really doesn't require more than two minutes. And creating a login page, a signup page, a few e-mail notifications, and the basic account management adminterface doesn't take more than 7 minutes. Another ten minutes on the phone to tweak the visuals together and it's all done.

      You can't do that. I know you can't, because long ago I was like you. I was taught the same carp as you were taught. Probably by the same persons. They teach that because it's the easiest to teach. Things are isolated, quantized, and able to be checked at each stage of the process. That means it can be taught stage by stage, supervised stage by stage, and managed stage by stage. It can be signed off stage by stage, priced stage by stage, and paid for stage by stage. All of that is internal to the development house, and a big waste of the clients' time and money.

    11. Re:I just simply disagree by harvestsun · · Score: 1

      I don't think you understand big O notation. In the "real world", where mathematicians devised a formal definition for big O, O(2n + 1) = O(n). This is as true as "2/4 = 1/2". I don't know what you're trying to imply by "==="; this is the language of mathematics, not PHP.

      Also, only COMPARISON-BASED sorts are limited by O(n log n). It's rather simple to devise an O(n) sort if the data are discrete, although it may take a while to pay off if the range is large.

    12. Re:I just simply disagree by holophrastic · · Score: 1

      You might be good to remember that mathematics, like most languages, describe observations. When the observations differ from the descriptions, it's the descriptions that are incorrect, not the observations.

      When O(2n + 1) takes four hours, and O(n) takes two hours, they are simply different. The faster one is the better one. The reasons behind why it is or is not faster, and how that relationship may or may not change for significantly larger or smaller data sets is irrelevant. This is the data set. This is the faster way. Predictions of other scenarios simply doesn't matter.

      You are certainly correct about the discrete data. My point was that sorting algorithms in first-year university computer science didn't make the distinction that you just did in one sentence. That makes you smarter than everything that was taught in that class. Plain and simple.

    13. Re:I just simply disagree by Anonymous Coward · · Score: 0

      You really need to stop talking and take a course in algorithmic analysis, because you don't know what you are talking about.

    14. Re:I just simply disagree by Anonymous Coward · · Score: 0

      Big-O, et. al., do NOT define how long a program will take. These measures so how efficient an algorithm is based on data size. And here, "efficient" isn't necessarily time. It can be any resource, such as memory. The "2" in your example above is the coefficient. It shows that the one algorithm has a higher start-up or per element cost. It does NOT change the fact the algorithm is still linear, that is O(n).

    15. Re:I just simply disagree by Anonymous Coward · · Score: 0

      There are a lot of O(n) sorting algorithms (e.g., Bucket Sort) and they ARE taught. Well, at least at schools that actually teach Comp. Sci., and not just "programming in Java." You aren't special.

    16. Re:I just simply disagree by holophrastic · · Score: 1

      You really need to get out of school, and run a rel-world challenge. See what happens when it's your time and money and reputation on the line. The word "course" has a very different meaning outside of school.

    17. Re:I just simply disagree by Anonymous Coward · · Score: 0

      So, you completely misunderstood your professor and think you're a genius? You cannot do a comparison sort better than O(n log n). This can be proven. BUT you can do sorting without comparisons with particular data sets, in linear time. You just needed to pay more attention in school.

    18. Re:I just simply disagree by holophrastic · · Score: 1

      The only reason to use big-o notation in the first place is to figure out whether or not to change your algorithm in order to make it run faster. We're not measuring something for fun. We're measuring it so we can take action -- that's why we do things.

      That higher start-up or per-element cost is a perfectly valid reason to change an algorithm. That cost can result in more time spent than substantially changing the data size. I don't care how my algorithm will perform on data I don't have. I car how it will perform on data that I do have.

      When we step out of school, and into reality, 1/2 is very different than 2/4. For example, you can have 1/2 of a couple, you can't have 2/4 of a couple. The denominator describes a potential subdivision. It needs to be possible.

      Math ends when the bedroom door is 81% open, and you realize that the door is still open.

    19. Re:I just simply disagree by Anonymous Coward · · Score: 0

      I've been out of school, in the "real world," writing everything from Windows apps to real-time, embedded systems for DECADES. Try again.

    20. Re:I just simply disagree by holophrastic · · Score: 1

      Taught, second to other sorting algorithms. Or are you saying that MIT is just programming in java too?

      Look up some curriculae. Find quicksort, and find bucket sort. See how many months apart they are.

    21. Re:I just simply disagree by Anonymous Coward · · Score: 0

      What are you talking about? When I went to college, many years ago, I learned about the Bucket Sort my very first semester.

    22. Re:I just simply disagree by holophrastic · · Score: 1

      Put your name to your arguments. If you aren't willing to stand by them, they haze zero value to you.

    23. Re:I just simply disagree by harvestsun · · Score: 1

      >You might be good to remember that mathematics, like most languages, describe observations
      Uh, no? Maybe you're thinking of applied math, or physics, but math deals with purely abstract entities. Certainly this is the case with Big O notation.

      >When O(2n + 1) takes four hours
      Hold on WHAT? Big O notation doesn't have any notion of time. If I say "this algorithm is O(2n + 1)", I'm not saying "this algorithm takes 2n + 1 steps to complete", I'm saying "as n approaches infinity, the steps to complete the algorithm divided by (2n + 1) does not approach infinity." This is equivalent to O(n), that's easily provable. I don't know how you're not understanding this. Maybe this is what you get from shunning "popular attitudes", when some of those "popular attitudes" include indisputable fact.

    24. Re:I just simply disagree by Anonymous Coward · · Score: 0

      Wow, what a come back. It's the argument that's important, not the name. Unless you think ad hominems are valid arguments.

    25. Re:I just simply disagree by holophrastic · · Score: 1

      You haven't learned that if you aren't willing to stand by your arguments, then they have zero value to you. Get a name.

    26. Re:I just simply disagree by holophrastic · · Score: 1

      If you aren't willing to put your name to your argument, then it has zero value -- both your argument and your name.

    27. Re:I just simply disagree by holophrastic · · Score: 1

      Yes it's the argument that's important. And you've ascribed zero value to it. I can't debate with a coward -- I can't tell if it's one person or multiple persons. Ask someone to finally give you a name, and then I'll tell you how the syllabus put comparison sorting three months ahead of discrete sorting. I'll tell you how sorting was taught without considering the data.

    28. Re:I just simply disagree by holophrastic · · Score: 1

      Dude, the only reason we're measuring the algorithm is to measure it's impact on resources -- time being three of those resources. No one with an actual dataset care about it approaching infinity. We care about it approaching the maximum size that it can approach -- which has real-world bounds well below infinity.

      Stop doing homework. Start investing your own money into things. "abstract" takes on a whole new meaning. You're forgetting that every time I use Big O notation, I can lose my house. It's that simple. It's my house. The only thing "abstract" about my use of Big O is how it can take away my house.

    29. Re:I just simply disagree by Anonymous Coward · · Score: 0

      NO, we don't. Big-O is a tool that tells how well an algorithm will scale with the data size. A "slower" algorithm, Big-O-wise, can actually run faster for a particular data set or resource (i.e., disk-based sorting). You don't change an algorithm hoping to get a speed improvement, based on its Big-O value. You MEASURE. You do actual performance testing to see which is better for your system.

      FYI, and stop with the "when we step out of school" nonsense. Your condescension is misplaced. A lot of us have been out of school for a very long time.

    30. Re:I just simply disagree by holophrastic · · Score: 1

      Lookup the definition of the word "school". You'll find that it has nothing to do with education -- you went to school for decades, and they never told you what it was. You don't even understand my condescension. Few fish do.

      But what else should I expect from a coward? If you aren't willing to put your name to your arguments, then you devalue both your name and your arguments.

      Here's a tip. In the real world, when your house is on the line for everything you do, the "data size" never changes. The data shape can. The data does. But the data size does not. If you can understand why, then you've left the world of academia. If you can't, then everything you do is an academic exercise.

  157. Re:Code Comments (and some core algorithms) by ZahrGnosis · · Score: 1

    Ah, I'm glad someone already hit this. I'd have gone with a more generic "readability" and "documentation", but yeah.

    I'd also include a few more mathematically interesting algorithms that push graphics as well as algorithm and iterative design. Breshnam's circle algorithm comes to mind, as well as fractal programming. For very precocious kids, pushing a 3d object from scratch is a great way to learn (i.e. rotate a cube using nothing but the ability to turn on and off a pixel).

    On the other hand, while I would definitely avoid complex libraries as the "genuinely useful" curriculum, most coding these days kind of eschews these concepts, for better or worse. Learning how to wrangle a .NET, Ruby, or Java library set is just as important these days. I'm not sure how to handle that in a core curriculum.

  158. Source Control by Rob+Riggs · · Score: 1

    I was hoping to find someone that mentioned this already and mod them up, but no one has as yet.

    Source Control

    Ask any software developer worth his salt and he will tell you that they use source control.

    When programming for fun or profit, this is how I start:

    1. Create the repo.
    2. Create a test.
    3. Write the code to pass the test.
    4. Commit the code.
    5. Go to step 2.

    You may disagree about the rest (TDD), but step 1 stands. With all the great free source control tools available, there is no excuse for not using source control.

    --
    the growth in cynicism and rebellion has not been without cause
  159. Re:I can think of one that Steve Jobs disagreed wi by Z00L00K · · Score: 1

    And I was stating the important parts of education here - anyone can hack up a sorting routine but in the real life business world the items I did list are what's causes the majority of the failures in projects. People not knowing their tools and inability to write code that can be maintained.

    Don't waste time on writing your own sorting algorithm in a commercial application - it just wastes time and money for the project unless it's a very special kind of sorting that's unique to that project.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  160. Re:I can think of one that Steve Jobs disagreed wi by JoeMerchant · · Score: 1

    The power plug.

  161. Engineer does not mean what you think it means by Anonymous Coward · · Score: 0

    You should know that Real Professional Engineers won't like you calling yourself one. Anymore than Architects, Doctors or Lawyers would want you to call yourself a Doctor of Software or Database Plumber.

  162. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    I think he meant build-by-plugging-together-like-lego-knockoffs-because-otherwise-this-analogy-doesn't-work software development for his comparison. Lego blocks are manufactured with 2-micron tolerances, so even if one were merely building something else with them the pieces would still all fit together perfectly.

  163. a geniunely useful idea by swschrad · · Score: 1

    .
    .
    .
    include (DWIT); /* do what I'm thinking, dammit! */
    .
    .
    .

    --
    if this is supposed to be a new economy, how come they still want my old fashioned money?
  164. Re:I can think of one that Steve Jobs disagreed wi by Z00L00K · · Score: 1

    Just consider that in the majority of the business applications that floats around in the world right now that are built by programmers there's no real concern about how the sorting is done, the things that most people are concerned about is if it's correctly sorted according to their particular alphabet because if stuff comes out in the wrong order like "AÄÅBC....OÖ...Z" instead of "ABC...ZÅÄÖ" for Swedish people then that software is dead, no matter how smart the sorting algorithm is or what it's called.

    This is the big deal - care about the whole system picture and leave the details to well-known well-documented standard routines. If my "ORDER BY" statement is done through Quick Sort or Bubble Sort or some other kind of sort is not of any concern as long as it does the right thing and is fast.

    B.t.w. if you have that kind of employment criteria I suspect that you get more than the average share of esoteric people as employees.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  165. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    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.

    It might be interesting to know what sorts of problems you think fall into this category.

    Not that I disagree with your general statement, but I find the "low skill" programming jobs tend to fall into some basic camps, like business tools, and e-commerce sites, and system administration. Almost all of these cases have much higher level tools available for solving the problems that simple programming. Much of the skill required is actually in configuration or manipulation of the tools components (which is not a insignificant skill set). For example web Content Management Systems (CMSs) replaced craploads of re-invent the wheel web programmers with people spending their time configuring drupal/whatever modules. And ERP software did the same for many business process programmers.

    This doesn't mean that there aren't a bunch of programmers basically working on legacy systems that could be replaced by more modern packages, just that a lot of programming jobs seem to actually be SAP/Labview/whatever "administration" with some programming thrown in to fill in the gaps. The guys actually doing the heavy lifting for this stuff work at SAP/NI/Oracle/IBM/etc.

  166. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Find me a mechanic who's job description includes designing new engines, and I'll show you a mechanic that can build a V8 ;)

  167. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    You Sir, are the idiot! As are the other moronic responses to Jane's post...

    I haven't seen so many people missing the feckin' point.. What Jane Q.P. is saying is sooo true. Demonstrating you can implement an algorithm like QS (at the very least!) shows the right sort of mindset and aptitude you'd want in a DEV. She is not saying she expects every DEV to sit down and re-invent the wheel for every problem, but to apply that type of thinking to the greater problem.

    I hate to think what sort of questions you would ask in an interview to find a decent DEV.

    "Can you operate google?!" your HIRED!!!

    Even I could cobble together stuff doing that... I agree... If you couldnt explain to me how to implement something LIKE QS in an interview, you buddy, are not hired!

    Thanks,
    James

  168. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Far worse than the programmer who doesn't know how to write a bubble sort is the programmer who insists on writing his own bubble sort, or memory management module, or any other piece of code that already exists in an adequate state. I have fired more than one for wasting my time and resources creating code that while well done required the other programmers to learn it, required maintenance, and delayed the project. If it already exists don't build it - unless it is the one thing on your critical path that is slowing your execution and you really, really, really critically need that time.

  169. My 'outside the box' list by jlowery · · Score: 1

    Useful skills related to programming, but not programming technology:

    1) how to take a complex problem and break it down into simpler problems

    2) how to reduce risk by slipstreaming accumulated small changes into a production changes (see 1, above)

    3) build client trust by implementing the low-hanging fruit, first.

    4) make yourself redundant through documentation and mentoring. It may not seem in your best interest, but it's the professional thing to do, and prods you to move on to other things.

    5) Choose the right tools for the job

    6) (Corollary to 5): If you're programming in XML, you're doing it wrong.

    7) take time to think about a problem. If you think you have a solution, sit on your hands!: don't code until you've examined the drawbacks.

    --
    If you post it, they will read.
    1. Re:My 'outside the box' list by jlowery · · Score: 1

      Mangled that a bit:

      2) how to reduce risk by slipstreaming accumulated small changes into a production SYSTEM (see 1, above)

      and forgot:

      8) carefully proofread anything you post on a public forum

      --
      If you post it, they will read.
  170. 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.

  171. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Yeah, agreed. This guy (gal?) is a twit, and I'd never work for him (her?).

    As for the V8, I'd worry more about a chef that can't build a V8. I mean, it's just vegetable juice blend, right?

    Personally, I'm a developer that doesn't know how to build a hashtable beyond just Hashtable blah = new Hashtable(); and I don't see a reason why I'd need to know how to do that from scratch, given the ease of just calling the constructor for a pre-built type.

    Do I know what a hashtable is? Yes. Do I know its performance characteristics compared to, say, a raw array or a linked list? Yes. Do I know how to build one? No, and I don't need to. I stand on the shoulders of giants. I don't see a reason not to, since the giants aren't complaining about it. And if I ever did need to implement my own hashtable, I'm pretty sure I could figure it out.

    The GP's attitude is not only elitist, it's also stupid, short-sighted, and inefficient. If the GP is a development manager somewhere, they should be fired if they ever let the attitude they posted here get a foothold in the workplace.

  172. Fast Fourier Transform by MetricT · · Score: 1

    It underlies signal processing, video/audio compression, medical imaging, radio, and ton of other things too. A lot of technology we take for granted simply wouldn't be possible without it.

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

  174. know how to ask the questions... by schlachter · · Score: 1

    Related to your point. Know how to look things up in books or online and know how to ask the right questions.

    I rarely know how to do something off the top of my head. The speed at which I can converge on a good example and/or tool kit and understand how to use it for my application is key.

    --
    My God can beat up your God. Just kidding...don't take offense. I know there's no God.
  175. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    your != you're. It never ceases to amaze me that people devoted to learning new languages on a six month cycle are unable to learn one...

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

  177. Re:I can think of one that Steve Jobs disagreed wi by ImprovOmega · · Score: 1

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

    Quicksort is nice because it plays a little nicer with sequential data (improving cache hit rates and such), but unless you have a proper (and complicated) function for choosing the cut value, it ends up with an O(n^2) complexity in the worst case. HeapSort and MergeSort are guaranteed to run in O(nlogn) time, and while MergeSort requires O(nlogn) memory to operate in (while still playing nice with sequential reads), HeapSort does all of its sorting in place in the original array at the expense of trashing sequencing. All of the above need to be taught and understood by the student before being trusted with any serious algorithm work. The lessons you will learn from the tradeoffs and benefits of these three sorting algorithms translates well into absolutely everything else you may want to do in programming.

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

  179. Computation is mathematics by Half-pint+HAL · · Score: 1

    I can't really disagree with most of the stuff he mentions, but where's the mathematics? Statistics, graph theory, set theory, calculus, algebra and multidimensional algebra taken together provide the basis for the solution to a lot of hard problems. For one thing, how can you talk about optimisation if you don't know how about polynomials and exponentials.

    --
    Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
  180. Rarely Taught, Extremely Necessary by Anonymous Coward · · Score: 0

    Configuration Management. Simple, easy. Never had a formal class on in in HS or College, nor was it a section in a formal class.

  181. languages stabilizing after 40 years for me by peter303 · · Score: 1

    I seem to remember a lot of language churn at both the university and industry in the 70s through 90s. Now I see some stability in languages and environments.- basically an OOP derivative of C like Java/Scala or C#. And an OS derived from UNIX/Linux which inlcude iOS and Android. The most churn I see now are cloud OSes or web-services.
    We've been a Java shop for almost 20 years now.

  182. First Principles by ElitistWhiner · · Score: 1

    The sooner you start to code the longer the project is going to take.

  183. Where`s scrum? by Anonymous Coward · · Score: 0

    I mean we`re all using it... right?

  184. Re: Database Transactions by Half-pint+HAL · · Score: 1

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

    Is that really a problem? It's a pretty good way to introduce the concept, because the whole idea of data consistency is easy to get you head round with a bunch of tables.

    Besides, what other computer paradigm comes with the tools to implement atomicity as standard? Under most OO systems you have to unwind the changes in exception handlers... and that's before you get to something as basic as C.

    --
    Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
  185. Re:I can think of one that Steve Jobs disagreed wi by mrchaotica · · Score: 1

    Not to mention the tolerances! Most people have no idea just how precise they have to be in order to hold together yet easily pull apart like that.

    --

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

  186. Re:I can think of one that Steve Jobs disagreed wi by sjames · · Score: 1

    How is that programmer going to have any idea what existing parts are suitable or not if he has no idea how to write even the fundamentals from scratch if necessary?

    Naturally, you don't want the guy who will ignore the fine QS already in the system library and write his own (unless there is a very good justification based on a particular problem). You also don't want the guy who never had a single clue why QS is better than Bubble.

    So you hire the guy who can and has written a QS once but has the sense to use the one that comes for free in the library.

  187. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Your response has nothing to do with the post you replied to.

  188. Re:I can think of one that Steve Jobs disagreed wi by mrchaotica · · Score: 1

    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.

    By that standard, Jeremy Clarkson is an expert programmer. Therefore, that is a terrible analogy!

    --

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

  189. Re:I can think of one that Steve Jobs disagreed wi by Crazy+Taco · · Score: 1

    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.

    There is definitely some truth to what you say. I started out as a programmer in 2007 but quit programming and went into infrastructure/systems engineering after my first programming job precisely because of what you just described. I got into computers and programming initially because I had a desire to cultivate a deep understanding of the computer and how it worked, and I discovered very quickly that modern programming is all about the latest "shiny new framework" and slapping something together as quickly as you can (the politically correct term for this is, of course, agile). That's all well and good, and there is a definite place for that because speed to market is very important in a competitive environment. And a lot of people really seem to enjoy that style of rapid development at the expense of truly understanding what is going on. But it wasn't for me.

    That said, there is also truth to what the grandparent said when he posted this:

    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 inevitably go wrong.

    Those people with the "fragile sort of knowledge" are at everyone's mercy when things go wrong. They literally have no clue where to go next or how to troubleshoot if things don't work exactly right. And in my company, it's me and others at the heart of the infrastructure devops teams who they come to when things go down, because we are the ones who actually understand how it all really works underneath the high level frameworks and scaffolding. We understand the networking, the HTTP, the authentication protocols, languages and everything else at the bottom. The best programmers, at least at this company, are the ones who did those rapid development jobs for just a few years and moved as quickly as they could into backend "Developer Center of Excellence" type teams, where their job is to support other developers, create standards, write programs designed for the infrastructure as a whole and therefore learn the deeper points of the technologies.

    Conclusion: The grandparent is right when he says that the best programmers understand how things work under the hood and could write these objects from scratch if they had to. But you are right when you say that not all programmers have to be at that level in order to do something effective. Both types are essential to organization, because you have to have people fast enough to outmaneuver the competition, but also really solid people in reserve to back up the quick and dirty developers when things go wrong.

    --
    Beware of bugs in the above code; I have only proved it correct, not tried it.
  190. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    rebuilding is not building. that's why they don't call it building...

  191. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    This. I think there is a corollary here. The algorithms you use to solve problems are also useful for doing anything, like reading or writing code, or thinking.

    Divide and conquer is not just to solve the problems, but it is also a way to *think* about problems.

    Like wise with binary search and sorting

  192. Re:I can think of one that Steve Jobs disagreed wi by marcosdumay · · Score: 1

    Well, I don't know where did you take a chemistry example from... But keep in mind that this phrase only got said because chemists are required to know software development nowadays.

  193. It's worth investing effort... by loshwomp · · Score: 1

    Code that's successful tends to last a lot longer than its creators anticipated, so lay that foundation carefully. It's usually worth investing effort to do it as right as possible the first time. Doing it "quick and dirty" is the equivalent of mailing somebody a bomb, and often the recipient of that bomb will be you.

    That said, there are some fantastic programmers in the quick-n-dirty catagory. Use them effectively--to throw together proofs of concept and demos, to explore alternate implementations, etc. Just don't let them manage the whole damn project.

    As the codebase gets larger and older, collecting dependencies along the way, it gets exponentially more expensive to redesign/rework components. Sometimes those are the only good ways to fix bugs, so you'll end up with not-so-good band-aid fixes instead. Then, your technical debt is growing exponentially along with your codebase.

  194. If I met... by g0bshiTe · · Score: 1

    A master of software programming, I seriously doubt he would recommend I learn Javascript.

    --
    I am Bennett Haselton! I am Bennett Haselton!
  195. Like clocks go tick and cows go moo... by Anonymous Coward · · Score: 0

    ...programmers go "what could possibly go wrong."
    That's their DNA.

  196. First on my list would be ... by Anonymous Coward · · Score: 0

    The best skill, I think, is being able to quickly diagnose problems with code.

    Being employed as a general help desk person at a University computing lab back in the '80s taught me how to read code quickly, how to identify why it failed quickly, and to explain to the befuddled student why it failed. (We weren't supposed to do that - course teaching assistants were expected to do that - but in the flood of incoming people, we had to do that.) The last part - explaining to someone why it failed is (I think) the most important part. You didn't want these people coming back, so you had to learn how to tailor your explanation to different people very quickly.

    Once you've done it for one language or API, you can do it again and again for other languages and APIs.

  197. Re:I can think of one that Steve Jobs disagreed wi by rk · · Score: 1

    Guess who gets the call if what I want is a tasty meal?

  198. State Machines by shon · · Score: 1

    Haven't seen it mentioned yet, but state machines are incredibly useful.

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

    Well, I don't disagree with you either, necessarily. But regarding terminology, I would call your "backend" people "programmers", and the other guys "hacks".

    Just as a rivet-pounder building a bridge is not an engineer.

  200. Well put by warrax_666 · · Score: 1

    We don't always agree, but well put, sir. (This and your original post.)

    The thing non-experts always neglect when thinking about high performance is the importance of cache locality and memory locality... and the fact that these can often dominate even algorithmic improvements (for realistic N).

    --
    HAND.
  201. prototyping by green+is+the+enemy · · Score: 1

    This simple idea is used in all branches of engineering. It's basically prototyping. You never build the full-blown complex system from scratch. You start with a simple prototype. If that works, you increase complexity and add features. Adding features increases cost, but if you have demonstrated feasibility, it's much easier to get the customer to pay.

  202. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    Yes, in the event that we are stranded on a desert island with no internet access, but somehow have a working computer with a compiler but no standard libraries and we need to write a sorting algorithm, but the computational efficiency of the sort is incredibly important. In that case, you should be able to write a quicksort from memory. Let's all invest some more effort into staving off this scenario. Because we should not be able to prioritize according to likely need.

  203. Reply by Anonymous Coward · · Score: 0

    A lot of the best tips out there revolve around making your code maintainable. Some of the best ways to do this looking into test-driven development, refactoring, keeping your code modular and strongly cohesive, learning to identify smells, learn dependency breaking techniques, write quality documentation (UML, comments), learn design patterns, study algorithms, etc. There are various books out there covering these topics and all of them are pretty language neutral.

  204. Re:I can think of one that Steve Jobs disagreed wi by Anonymous Coward · · Score: 0

    First, read this:

    Knuth: The Art of Computer Programming, Volumes 1-4A Boxed Set
    http://www.amazon.com/Computer-Programming-Volumes-1-4A-Boxed/dp/0321751043

    Then read this:
    https://www.sans.org/top25-software-errors/

    Everything else is a niche.

  205. Re:I can think of one that Steve Jobs disagreed wi by DamnStupidElf · · Score: 1

    Not to mention the tolerances! Most people have no idea just how precise they have to be in order to hold together yet easily pull apart like that.

    The first time they pick up some megablocks or other imitations, they get a pretty good idea.

  206. Re:I can think of one that Steve Jobs disagreed wi by DamnStupidElf · · Score: 1

    I'm sad to learn that, by your standards, I'm not currently a programmer, but merely a hack just out of high school, as I couldn't write a quicksort to save my life. Ironically, though, 20 years ago, when I WAS just out of high school (and WAY less experienced/skilled), I apparently was a programmer back then because I could and did write a quicksort at that time.

    That is kind of sad. Could you describe how quicksort works, at least? Does divide and conquer ring a bell? How about a pivot element? I'm not going to require you to do it in-place or anything. If you've forgotten how to program I'm not sure what to say, except that you have my condolences.

  207. Re: I can think of one that Steve Jobs disagreed w by muridae · · Score: 1

    You mean like Heapsort? One of those algos that most computer science programs still require you to write, just to prove you understand how to implement a heap?

  208. Re:I can think of one that Steve Jobs disagreed wi by muridae · · Score: 1

    A good compiler, as pointed out elsewhere in this discussion (look for lisp and closures) can be implemented in very few steps for the right language, and still be complete and usable.

  209. Hugh Pickens DOT com by Anonymous Coward · · Score: 0

    Hugh Pickens DOT com is the new Mrbabyman

  210. The Pragmatic Programmer by Roger+Wilcox · · Score: 1

    Andrew Hunt and David Thomas have done this already. This book contains the universal truths of programming, from a high-level perspective. It addresses analysis, coding, dealing with management, planning for the inevitable shitstorm, and even keeping yourself sharp as a programmer. Their book is the one book I would recommend to any programmer, from novice to expert. Further, I would recommend that you buy it, keep it, and reread it every couple of years. The concepts therein will be applicable to any programming you will do in any language and in any environment.

  211. Geez, none of that... by Anonymous Coward · · Score: 0

    How about being curious and enjoying solving math story problems?

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

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

    I read what you posted very carefully and what I posted still stands. Although I could do this there is no reason to so why SHOULD I bother when Googling for an optimized free solution is quicker. Providing I understand everything that the code I find does and it is unencumbered by licence restrictions then that is fine, that does not mean I would make knowing how to rewrite a 30 year old, hardly used (in code we actually write anyway) algorithm part of a recruitment process for new developers.

    --
    I dont read /. to RTFA, I read /. to offend people in ignorance.
  213. Concept programming by descubes · · Score: 1

    Concept programming is the simple idea that the concept is not the code, and that being aware of the differences matters.
    See http://xlr.sourceforge.net/Concept%20Programming%20Presentation.pdf for more details.

    --
    -- Did you try Tao3D? http://tao3d.sourceforge.net
  214. Fundamentals by Anonymous Coward · · Score: 0

    Write an assembler. Write a compiler. Write an operating system.

  215. Re:I can think of one that Steve Jobs disagreed wi by vilanye · · Score: 1

    +1 good sir.

    It is incredible how many people think they can be useful programmers just by being API monkeys.

    Which is why hash tables are overused.

  216. Re:I can think of one that Steve Jobs disagreed wi by vilanye · · Score: 1

    If you aren't capable of building those libraries if you had to, you shouldn't be using them. You shouldn't be programming at all.

  217. Improvements by brunnegd · · Score: 1

    Use more GOTO statements.

  218. Re:I can think of one that Steve Jobs disagreed wi by vilanye · · Score: 1

    You aren't describing programmers, you are talking about assembly line workers.

    He was talking about professional programmers.

    You are talking about people who get paid at $12-$15 an hour as compared to $100,000+ software professionals.

  219. Two great books to start with by Anonymous Coward · · Score: 0

    Code: The Hidden Language of Computer Hardware and Software

    The Annotated Turing: A Guided Tour Through Alan Turing's Historic Paper on Computability and the Turing Machine

    Both by Charles Petzold

    Easy to read and once you understand both books, you will be much further in understanding computers and computation than 95% of programmers. Sad, but true.

  220. Re:I can think of one that Steve Jobs disagreed wi by romons · · Score: 1

    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 is actually quite interesting. I suspect that the requirement to build code that is maintainable is currently less important than being able to get something out there quickly. In my experience, that leads to programmers who copy code around the source base; who do 'micro fixes' rather than larger fixes that might lower overall costs; that write giant routines that work well but don't factor well; things like that. I'm no longer a programmer, but I remember when that sort of code was frowned upon. No longer; the important thing is to do it quickly, get it running, because the technology is changing such that you'll probably throw the whole thing out in a year or two. Why waste time on elegance when it is throw away? Everything is a demo these days.

    --
    Go to Heaven for the climate, Hell for the company -- Mark Twain
  221. Re:I can think of one that Steve Jobs disagreed wi by romons · · Score: 1

    Short story. I used to work with a woman who was a fairly high paid programmer. She had a masters degree in CS from some university in Belgium. Unfortunately, she did not understand hash tables, their use, or the benefits. She did every programming job we gave her using linked lists. These lists were often thousands of elements long, and had short, unique text labels. There was a hash table facility built into the system library. We patiently helped her move her linked lists into using the hash table facility, but she persisted in using those damned linked lists on everything new. When you have a hammer, everything looks like a nail. Everybody who gets out of school in CS should understand the basics.

    --
    Go to Heaven for the climate, Hell for the company -- Mark Twain
  222. Re: I can think of one that Steve Jobs disagreed w by romons · · Score: 1

    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.

    However, you know the difference between a bubble sort and a quick sort, right? You don't need to be able to code them to understand when they might be useful, and when to apply them. That is the sort of knowledge that is important to have.

    Being able to reproduce a qsort in C during an interview isn't required, I think. Knowing where to use it, how to set up the data structures: that is the skill I want people to have for a C programming job.

    --
    Go to Heaven for the climate, Hell for the company -- Mark Twain
  223. Set theory, functional programming, and C. by pigiron · · Score: 1

    Relational databases are firmly defined by set theory and what is easier to understand really than Venn diagrams?

    All processes are functions and XML docs are really just S-expessions so what could be easier and simpler than using LISP (and in particular the interpreted LISP 1.x-like newLISP which can double for any scripting duties and has the ability to interface both with RDBMS's and C/C++ runtime libraries, among others?)

    C when you absolutely, positively have to and only on sections of code that need it for performance tuning ~5%.

  224. Re: I can think of one that Steve Jobs disagreed w by Anonymous Coward · · Score: 0

    What are you going to do when your hashtable doesn't perform as it should? Would you even know?
    Real world example: early versions of Java only used the first 10 characters of a String in the hashcode. This is fine for some uses, but horrific for others. It's a shortcut you can only safely perform if you know your domain - it's certainly not safe in the general case.
    What's the big-O of insert in a hashtable? O(1)? Nope: O(n) worst case.
    It's only O(1) amortized - if you're choosing a hashtable you are choosing a hash function and a growth and a collision policy. How will you do that if you don't know how hashtables work?

  225. Re:I can think of one that Steve Jobs disagreed wi by michelcolman · · Score: 1

    Actually, I was not talking about expert programmers (which you can still find at a handful of companies like Apple and Google), but about "programmers" who just throw a bunch of libraries together. A lot of software and hardware companies would indeed hire Jeremy Clarkson to design a kitchen blender. Unfortunately.

  226. Re:I can think of one that Steve Jobs disagreed wi by LordKronos · · Score: 1

    I'm sad to learn that, by your standards, I'm not currently a programmer, but merely a hack just out of high school, as I couldn't write a quicksort to save my life. Ironically, though, 20 years ago, when I WAS just out of high school (and WAY less experienced/skilled), I apparently was a programmer back then because I could and did write a quicksort at that time.

    That is kind of sad. Could you describe how quicksort works, at least? Does divide and conquer ring a bell? How about a pivot element? I'm not going to require you to do it in-place or anything. If you've forgotten how to program I'm not sure what to say, except that you have my condolences.

    Why is it at all sad that, after 20 years, I've forgotten the implementation details of a specific algorithm that I've NEVER had to implement (other than as part of the learning process back then) since it's already been implemented in the standard library of just about every language or API that I've ever worked with (and that implementation has probably been done better than I could do it, because it has likely been done by someone who has studied sorting algorithms in much more detail than I ever did)? What does that have to do with forgetting how to program? I rebuilt an engine in high school, but I don't remember how to do it now. Does that mean I've forgotten how to repair my car, too?

    And how does it work? Well, I could tell you now, since the curious part of me went and looked it up on wikipedia to refresh my memory the second I finished making that post. And you might think that's fine, since that proves I can actually do it, except for the fact that, had I first ran into Jane Q. Public in an interview rather than on slashdot, I would have failed that requirement at the time.

    But to answer your question with the knowledge I had at that time, the only part of it I could remember is that divide and conquer is part of it. But I couldn't remember how it dealt with getting values sorted between the left and right halves (doing a rough sort before dividing), nor anything about the pivot point or how to select it.

  227. Re:I can think of one that Steve Jobs disagreed wi by DamnStupidElf · · Score: 1

    Points taken; I spend a lot of time in the man pages and other references. I think the part I misinterpreted was the "I couldn't write a quicksort to save my life", which if taken literally means an inability to write simple programs. What I think you meant was "I couldn't write a quicksort in a few minutes without spending some time looking up reference material." I think anyone who has studied computer science should be able to come up with quicksort given enough time and motivation (and pencil and paper, at least). The concepts of divide and conquer and in-place array operations are just too basic to programming for something like quicksort to not eventually be developed by a competent programmer.

  228. What to learn by Anonymous Coward · · Score: 0

    One of the things that should be on the list is proficiency in at least one language. For example, if one learns C#, Java, C++ ... then one has learned the basic syntax of a whole list of languages, or BASIC etc. And, learn how to use btrees, linked list and all that other stuff ...

  229. Re:I can think of one that Steve Jobs disagreed wi by lennier · · Score: 1

    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.

    ... except for everything that is a potential security risk, which is everything that potentially faces the Internet, which in 2013 is everything.

    Congratulations. You've just demonstrated in two sentences why the entire Internet ecosystem today is a huge gaping security disaster.

    ("But my script will never see the Internet! All our workstations are behind a firewall!" Let me introduce you to my little friend called "Bring Your Own Device". Did I say friend? I meant the kind of friend who likes hurting people. Good luck!)

    --
    You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  230. Re:I can think of one that Steve Jobs disagreed wi by lennier · · Score: 1

    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.

    ... given constantly changing and contradictory specifications, hardware, operating systems, programming platforms and data storage and transmission standards, on unmanaged, obsolete and malfunctioning endpoints, while preserving full round-trip data and binary code compatibility with legacy systems dating back thirty to fifty years, in an international multilingual ennvironment with competing national legal frameworks and data stewardship requirements, over an inherently hostile network, managed by uneducated users, while leaking no data or access rights in the face of organised crime and state-level espionage agencies.

    And that's just to begin to meet basic functional square-one user requirements on today's Internet.

    No pressure.

    --
    You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  231. Must know the foundation that you are building on. by richardlvance · · Score: 1

    Load Accumulator (lda)
    Add an integer (add)
    Store Accumulator (sta)

    Most CS graduates have no idea what this is, and that's the problem with CS.

    --
    cursethedarkness
  232. OOP Criticism (Re:quicksort better than OOP?) by Tablizer · · Score: 1

    As somebody who used to be known as an "anti-OOP troll" (even had slashdot stories around my writings), I've generally come to conclude that OOP has its place, but that place is not everywhere. Some projects or some parts of some projects benefit from it, others become more tangled because if it.

    It's another tool in the development tool-box; just don't use one tool for everything. The hard part is knowing when to use what tool, and that has yet to be scientifically investigated; and so is still a gray art.

    I find OO is sometimes useful for name-space management, but if you try to use it like the original OO books suggested you use it -- to build models of domains (such as employees, customers, store products, etc.), then you make a mess and compete with database modeling, duplicating concepts.

    Lately I see some Functional Programming (FP) proponents making similar hyped claims to what OOP proponents did in OOP's heyday. FP is the new OOP. FP has a place, but that place is not everywhere.

    There is a hype cycle in this business. New ideas are good to cultivate and explore, but early proponents often get carried away.

  233. Graph databases by Anonymous Coward · · Score: 0

    Relational databases are stupid, we should use graph databases.