Do Programmers Need to Understand Computer Hardware? | Programming Tip of the Day – Tim Buchalka

Do Programmers Need to Understand Computer Hardware? | Programming Tip of the Day – Tim Buchalka


– Does a modern programmer really need to understand
the computer hardware and how it interacts with software? Let’s talk about that in today’s video. This video is brought to you by the Learn Programming Academy’s PHP for Beginners course. Build a complete content
management system from scratch with PHP and MySQL in this course. Visit lpa.dev/YoutubePHP or click on the link in
the description below. (upbeat music) Welcome back, my name is Tim Buchalka with another programming tip of the day. And we’re talking about
whether modern programmers need to really understand
the computer hardware at a deep level. And I’ll start by saying that I’ve met programmers at all levels, I’ve got programmers
who understand hardware at a really deep level and are
really experts with hardware, I’ve met programmers who’ve got
a bit of hardware knowledge, and some who know absolutely nothing. So the good news is that
they’ve all got jobs so what that means is in general, you don’t really need to understand the computer hardware to get a job. There are exceptions to that and we’ll talk about that a
little bit later in the video. But I think it’s actually a good idea to have some understanding
of computer hardware and we’ll talk about
that a little bit later. But the reason that you don’t need that understanding today is that, to a large degree, computer languages that are in use today like Java, C# and Python, they’re a high-level programming language so there’s an abstraction layer between what you’re writing your code and the computer hardware so you’re not dealing with
access to chip level access or anything of that nature so it really doesn’t need
you to actually understand computer hardware to that level. Whereas in years gone by, you really needed to have
a fundamental understanding of the chip set and how
to get the most out of it to exploit it for your hardware. So it’s a good thing that
you don’t need to do that because that means that
you can write a programme in any of those languages and support a range of operating systems that run on different hardware. So that’s definitely a good thing. But certain jobs, getting
back to certain jobs, that need that, if you’re looking to get into something like perhaps embedded programming, that’s where you’re creating
software for devices, you’re actually writing software that actually is residing on a chip, typically in assembly language or C or something like that, you probably would benefit from
computer hardware knowledge. If you’re wanting to, say,
get into the Linux kernel and support that open source project, some knowledge of computer hardware would be very beneficial because that is written in a
range of low-level languages, C, it’s got some assembly and so forth, so you really should
probably have some knowledge if you’re getting into that. Another example would be device drivers. So if you’re writing software for video card drivers or a printer driver or something like that, they’re often written in
a assembly language or C and having a knowledge
of the computer hardware that the software that you’re writing will ultimately run on, would be very beneficial. So in those cases, yes you probably do need some
computer hardware experience and maybe it’s mandatory. Certainly having that knowledge I think would be very
desirable for those positions. So with that said, if you’re not looking to get into those areas, I still think it’s useful for you to have a bit of an understanding
of computer hardware. So things like, for example, if you’re using a variable
of data type bit, or a byte, you’re using that variable
in one of your programmes, I think it’d be very useful to know how does that actually get stored in binary on the computer? So what actually happens
when you actually create that variable in your computer, how does that get stored
on the computer in memory? That’s a useful skill to have because in some cases that can help you become a more efficient programmer because you’ve got more
of an understanding of what’s going on under
the hood, so to speak. And even other variables
like strings, for example and real numbers or doubles, that would be very useful to understand how that gets stored in
the computer hardware because again, it can
just get you thinking and hopefully making you a little bit more efficient as well. So I guess these days,
there’s less of a need to be focusing too much on how much memory your
computer program’s using, but certainly that is an issue. You can run out of memory, even with today’s modern computers, can probably come standard
with eight gigabytes of RAM, that’s fairly standard
these days, or higher. It is still possible to run out of memory and that’s one of the reasons for that is the operating systems
that we’re using today enable so many different
computer programmes to be running concurrently, that even with a lot of memory, you can still run out of memory because the memory on
that particular computer may be used by lots of other programmes. So it still pays to be
efficient where possible and just thinking about, being efficient is a good skill just basically for a programmer
to have, in my opinion. But giving you a bit of
an example about RAM, back in the 1980s, I used a computer called the Amstrad CPC 464. So this beauty didn’t
have a lot of memory, I think 64K was the default memory of that particular machine, and it came out with a disc drive and it was pretty
revelationary for the time because prior to that, cassette tape. That’s how we used to store our
programmes, on cassette tapes. So you can imagine how slow that was, it’s a sequential device, really slow to store your programmes and then to actually load them. So they brought out a disc drive, I think it was about 40
megabytes, still pretty small but compared to what cassette
tape was, it was fantastic. But it had sequential access only. So it was sort of like a
glorified cassette tape. If you wanted to get
to the end of contents of the hard drive, you basically had to read
through it sequentially, it was nuts, I don’t
know why they did that. But anyway, I was a brush young kid who was sort of 18 or something and I thought, “I can fix this.” So I wrote some code in
Z80 assembly language which enabled BASIC programmers, because it came with a BASIC language to access that disc randomly. That means they could
write accounting programmes and things like that that needed to access
random parts of the disc, to access random contents instead of sequentially
reading the data each time. And I had 2K to write it in. 2K of RAM to get that up and going. So in that case, I did need to understand the Z80 CPU at a deep level, I needed to understand the registers and how it all worked and it was great, it was great
information for me to learn but quite hard to learn because I jumped from BASIC
directly to assembly language. So the point of all this was that back then, it was really important to understand computer hardware and to write a programme like that I felt it was mandatory, there wasn’t really any way round it. But again, getting back
to today’s computers, today’s languages, rather, Python, C#, Java and so on, you really don’t need
to deal at that level when you can be a bit lazy and just think, “Oh just gonna create “some more variables here “and I’ll just create an array here “and I’m not worrying about memory.” So it can be a mindset to get into, so that’s why I’m suggesting that it’s still a good
skill for you to have to learn a bit more about hardware to make you a better programmer ’cause it just gets you thinking and trying to be a bit more
efficient in your programming and that’s always a good skill to have. Right so that’s a summary. Do programmers these need
the hardware knowledge? Well for most jobs, as I’ve outlined, perhaps no, you don’t need to have any. Some jobs are essential, it would be essential for you to have computer hardware experience and have an understanding of it, but in general, no you don’t need to. But I think having that basic
computer hardware knowledge will be beneficial and is a useful skill for all programmers to have. All righty, so I hope that helped. If you’ve got any questions, feel free to leave a comment
and I’ll get back to you. If you’re ready to look at the next tip, click on up here, and you can check that out. If you’re interested in
coding-specific programming videos, click on the link in the
bottom left-hand corner. Consider subscribing by
clicking on the link up here and I’ll see you soon!

6 thoughts to “Do Programmers Need to Understand Computer Hardware? | Programming Tip of the Day – Tim Buchalka”

  1. It’s good and important to know how a computer inter operates. You don’t need to know everything but a good understanding of how computers work is interesting from an engineering perspective. ICT is also an interesting angle, but wow oh wow Tim we have come along way from those early computers 🙌 you’re really a computer knowledge powerhouse. I really enjoyed learning about Hex and binary but programming in the programmatic languages we have today are much easier. God bless Tim for working through those old systems 👌

  2. Do you have a course on computer hardware? And I love your java masterclass I am in a halfway of the course after I finish it I will continue with your android course 👌

Leave a Reply

Your email address will not be published. Required fields are marked *