from Hacker News

Ask HN: Why do most fresh CS grads write such awful code?

by debanjan16 on 5/1/23, 3:03 PM with 5 comments

Is it the same with other engineering disciplines e.g. mechanical, electrical, civil, etc?

Or is it only the CS departments? Most write unmaintainable sphagetti code without any sense of proper data structures and the operations on them. Whenever a new functionality is to be added to their code, their code just crumbles and they have to rewrite everything. I have observed this many times.

  • by gregjor on 5/1/23, 3:40 PM

    Most programmers write awful code, according to most other programmers. You may have seen CS grads writing awful code "many" times, but you still have a very small sample to make generalizations from.

    The reason seems so obvious I interpret your question as a gripe rather than a sincere search for an answer. Anyone fresh out of school only has whatever they learned in school to work from. They won't have the experience that eventually leads at least some programmers to skills and effectiveness. Programming, like any complex skill, takes years of practice to master, along with aptitude and desire to get better. It stands to reason many people fresh out of school have just started down that path.

  • by detaro on 5/1/23, 3:05 PM

    Because most CS degrees are about computer science, not software development (or since you compare with engineering degrees, software engineering), and thus students aren't taught the latter (or only are if they pick certain classes).

    Same way a physicist specializing in electro-dynamics can't be expected to be a pro at designing PCBs for your electronic device.

  • by jleyank on 5/1/23, 3:14 PM

    Coding is a skill that must be developed and maintained. One may know the theory but skill comes with practice. I suspect the typical uni student isn’t a hacker in training and has only completed assignments.
  • by ActorNightly on 5/1/23, 4:34 PM

    EE/ECE grads are MUCH better coders than any CS grad.

    CS should fundamentally taught bottom up, from basic microprocessors all the way to javascript. Once you have the fundamentals down, everything else on top is easy to integrate.

  • by beardyw on 5/1/23, 3:21 PM

    They have gone through education, not training. It is just inexperience.