{"id":4166,"date":"2009-07-28T11:00:27","date_gmt":"2009-07-28T15:00:27","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=4166"},"modified":"2009-08-06T14:15:29","modified_gmt":"2009-08-06T18:15:29","slug":"software-engineering","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=4166","title":{"rendered":"Software Engineering"},"content":{"rendered":"<p>A student emailed me, asking about what I do for a living.  Not just my job title, but what specifically the job entails on a day-to-day basis.  You know, that&#8217;s an interesting question, because I had the same question myself at that age.  I loved programming.  I knew I wanted to do it a lot, which suggested it might be a good career.   But I didn&#8217;t have a clear picture of what a day at work would really be like.  Certainly the job is more than just writing code, right?<\/p>\n<p>The answer is, annoyingly, &#8220;it depends&#8221;.  <\/p>\n<p><!--more-->The term &#8220;software engineer&#8221; is pretty loose, and ends up being applied to just about anyone who writes code. (Which is probably incorrect.  Like calling a brick layer a &#8220;civil engineer&#8221;.) Rather than argue over definitions, we&#8217;ll just go with the broadest possible interpretation of the word. <\/p>\n<p>I work for a small company, and like most small companies everyone has very broad responsibilities.  If I worked at a big company, a lot of my duties would be split between senior and junior members.  The size of your company will have a bigger impact on your job than just about anything else. Microsoft and Apple might have a very different corporate culture, but they&#8217;re very similar compared to (say) working for a company with seven employees.  Having worked at both a large company (over 100 people) and small ones (less than 10 people) I have to say I like working in a small outfit far better.  Maybe I&#8217;ll compare the two in another post, but for now we can just simplify it by saying your duties will become more diverse as the company size shrinks, and narrower as it grows. <\/p>\n<p>Keeping this variable nature of the job in mind, here is a list of fundamental duties that will probably be a part of any Software Engineering career:<\/p>\n<blockquote><p><strong>Estimating a task<\/strong><\/p>\n<p>Someone will come to you with a software problem.  <\/p>\n<p>Tiny problem: &#8220;The daily reports don&#8217;t print the full date, which is causing paperwork confusion&#8221;.  <\/p>\n<p>Small problem: &#8220;We need a program to scan a set of directories and delete files older than X days or larger than Y bytes&#8221;.  <\/p>\n<p>Large problem: &#8220;We need our software ported to run on Macs&#8221;.  <\/p>\n<p>Gargantuan problem: &#8220;Write a full-featured operating system&#8221;.  <\/p>\n<p>Your job will be to draw on your knowledge and think about how long it will take to solve this problem.  How many programmers will be needed and how much time will they need?  I do this on a regular basis, although it&#8217;s the part of the job I hate most. In a larger company this sort of thing is generally given to the senior programmers. <\/p>\n<p>Once you give your estimate, someone else (probably not an engineer like you) will look at the problem and the cost to solve it, and decide if it&#8217;s worth it.  If it is, you&#8217;ll end up doing&#8230;<\/p>\n<p><strong>Design<\/strong><\/p>\n<p>This part of the job varies greatly.  &#8220;Design&#8221; might mean, &#8220;sit in your cubicle and think for a few minutes before you get started&#8221;.  Or it might mean, &#8220;attend meetings with other software engineers, design charts, and do extensive planning&#8221;.  Generally, the bigger the problem gets and the more people you have involved, the more formal this process is going to be.  You can&#8217;t begin building a bridge until everyone agrees precisely where it will be and what it will be made from.  And you can&#8217;t write software until you understand how it will work once it&#8217;s complete.  You need to decide what tools will be used (perhaps even decide on a particular programing language) who will do the work, and how all the parts will fit together.  Alice will build the interface.  Bob will write the server.  Carl will write the client.  Dave will port Carl&#8217;s work to Linux.  Etc. <\/p>\n<p>Maybe you&#8217;ll talk to people that have expertise relating to the problem.  For example, I know just enough about databases to get myself into trouble.  When you need to store data in a database, there are dozens of ways it can be done.  Some will be ploddingly slow or consume lots of storage space, and others will be fast and lightweight. A clueless programmer can make a mess without realizing it.  Whenever I do anything with databases I ask someone who knows more about databases than I do.  I describe the solution I have in mind and ask if they see any obvious errors to my approach.  <\/p>\n<p>Note that nobody can be an expert on everything.  User interfaces, databases, web applications, client \/ server stuff, 3D rendering, etc.  You&#8217;ll probably end up specializing in a couple of them and leaning on colleagues for the others.  <\/p>\n<p>Once you know how the system will function, it&#8217;s time to&#8230;<\/p>\n<p><strong>Write Code<\/strong><\/p>\n<p>The meat of the job.  You sit at your desk and type arcane symbols and indecipherable nonsense.  At least, that&#8217;s what it looks like to non-coders.<\/p>\n<p>You&#8217;ll hear programmers talk about using an &#8220;IDE&#8221;, which stands for Integrated Development Environment.  It&#8217;s basically a word processor  for computer code.  While not all programming jobs involve using an IDE, it&#8217;s certainly the most common sort.  You&#8217;ll type code into it all day, occasionally running the your program to see how it works.  <\/p>\n<p>This is the part of the job I love.  It&#8217;s solitary work, and the part of the job that requires the most intense levels of concentration. <\/p>\n<p>Once you finish a feature or reach a major landmark, it&#8217;s time for&#8230;<\/p>\n<p><strong>Testing<\/strong><\/p>\n<p>In a big company with big software, this is done by a team of people.  In a small company, it might just be a couple of people.  In a really small project, you might do this yourself.  The goal is to find bugs or design flaws. A bug is when the program does something that the programmer doesn&#8217;t intend, like always print January 1, 1970 for today&#8217;s date. Or crash.  A design flaw is when the program is doing what you expected, but it&#8217;s still not satisfactory for some reason.  <\/p>\n<blockquote><p>Tester: <strong>The program runs really, really slow on graphics cards with only 64MB of memory.<\/strong><\/p>\n<p>Programmer: <em>I didn&#8217;t know you wanted it to run on graphics cards with only 64MB of memory.<\/em><\/p><\/blockquote>\n<p>In my experience, design flaws are usually the result of an oversight that happened during the &#8220;design&#8221; phase.  You&#8217;ll end up going back to the drawing board and fixing problems you (or your boss) failed to anticipate.  Sometimes this will be because you didn&#8217;t think the problem through.  Sometimes it will be because you weren&#8217;t given clear objectives.   Programmers and their managers blame each other a lot, and you can always find amusing or tragic anecdotes about friction between the two. This conflict is one of the ongoing themes in Dilbert.  In truth, designing software is a big job and any decent-sized project is bound to have lots of misunderstandings like this.  <\/p>\n<p>And of course testing leads inexorably to&#8230;<\/p>\n<p><strong>Debugging<\/strong><\/p>\n<p>The old axiom applies:  &#8220;Programming is debugging.&#8221;  Your program <strong>will<\/strong> fail in various ways that you never discovered, and you&#8217;ll have to fix these problems.  This is the part of the job that requires the most intuition.  Once your program goes through testing, you&#8217;ll be given a list of problems, errors, bugs, and crashes.  <\/p>\n<p>The trick here is that people will explain problems to you, and their description will often be confusing or misleading.  They  aren&#8217;t tying to annoy you, they simply don&#8217;t understand your job, which is fine.  <\/p>\n<blockquote><p><strong>Hey, when I select an option from the menu, nothing happens.<\/strong><\/p>\n<p>Hm.  You try it yourself, and it seems to work fine. What&#8217;s going on here?  You&#8217;ll spin your wheels for a while.  Eventually you&#8217;ll go and try to duplicate the problem on the tester&#8217;s computer.  You try it, and it still works just fine. You ask the tester to show you the problem while you&#8217;re looking.  They do, and you notice that they&#8217;re using the keyboard to navigate menus instead of the mouse.  Sure enough, highlighting an option and hitting the enter key doesn&#8217;t do anything.  You forgot to set up the keyboard handler, because you always use the mouse for stuff like this.<\/p><\/blockquote>\n<p>This is where you&#8217;ll really get better with experience.  A senior and junior programmer might both be equally smart, and (if they&#8217;re using a new language) they might both have the same amount of experience with the given language.  But the senior programmer will be able to cut to the heart of a misunderstanding like this much faster.  As in, the new kid will spend hours on a wild goose chase and the old-timer will perceive the root of the problem in a few seconds.  <\/p>\n<p>Do not scorn the older programmers.  If you&#8217;re fresh out of college, you might be tempted to think of yourself as the New Hotness because you can work longer and faster than someone in their fifties. You might even have the hubris to imagine you&#8217;re &#8220;better&#8221; because you can output (say) twice as many lines of code.  But I would urge you to keep your hubris in check.  In college, they never teach you just how much you don&#8217;t know.  You will spend the first few years of your career learning this the hard way, and it will help a great deal if you don&#8217;t make a fool of yourself in the process.<\/p><\/blockquote>\n<p>There are other duties that orbit these basics.  Maybe you&#8217;ll dabble in hardware.  Maybe (like me) you&#8217;ll end up writing a lot of documentation.  Maybe (like me) you&#8217;ll be called on to take technical concepts and explain them to non-technical people. Maybe you&#8217;ll specialize in writing software for use by people in your company. Maybe you&#8217;ll write software that is sold to large clients.  You might even end up working on software that gets put in a box and sits on the shelf at Wall-Mart. It all depends on where you end up and what they decide to do with you.   <\/p>\n<p>So that&#8217;s the job. After all these years, I&#8217;m still comfortable calling it &#8220;a good gig&#8221;.  It&#8217;s not for everyone, but there are a number of people who can derive a lot of satisfaction from the work. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A student emailed me, asking about what I do for a living. Not just my job title, but what specifically the job entails on a day-to-day basis. You know, that&#8217;s an interesting question, because I had the same question myself at that age. I loved programming. I knew I wanted to do it a lot, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-4166","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/4166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4166"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/4166\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}