Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Code Samples for a Job Interview

Code Samples for a Job Interview

Scheduled Pinned Locked Moved The Lounge
careerquestion
53 Posts 36 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R R Giskard Reventlov

    Simply point them to the articles you have written for CP. Or tell them that you sell your code - how much are they willing to pay for it?

    G Offline
    G Offline
    glennPattonWork3
    wrote on last edited by
    #26

    I did that,:thumbsup: got the job!:cool:

    1 Reply Last reply
    0
    • T TNCaver

      I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

      If you think 'goto' is evil, try writing an Assembly program without JMP.

      M Offline
      M Offline
      megaadam
      wrote on last edited by
      #27

      In this case I think I would * try to find code from my current job unrelated to business logic, more like library utilities, print it, and say that you cannot leave it with them * talk to the interviewer on the phone about my predicament. Chances are, you are up against hordes of kids with github repos galore. It could happen that they are spoiled with easily comparable candidates... I was 52 when I got my current job, I think without my github I wouldnt be here.

      ... such stuff as dreams are made on

      1 Reply Last reply
      0
      • T TNCaver

        I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

        If you think 'goto' is evil, try writing an Assembly program without JMP.

        F Offline
        F Offline
        F ES Sitecore
        wrote on last edited by
        #28
        1. Create a repo on GitHub 2) Upload the following project

        public class Program
        {
        static void Main(string[] args)
        {
        Console.WriteLine("Hello, world!");
        }
        }

        1. Include it in your application 4) Profit
        T 1 Reply Last reply
        0
        • T TNCaver

          I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

          If you think 'goto' is evil, try writing an Assembly program without JMP.

          M Offline
          M Offline
          Member 11261991
          wrote on last edited by
          #29

          Do not, under any circumstances, give any code for a previous employer. Doing that is asking for trouble and may even be a trick question to see if you are reliable security person. If they cannot assess your abilities from the interview ,this does not speak highly for the company you applied to. If the interview went without anyone fron the SW Dept. being present is also a bad indicator. all in all, probably a bad employer.

          T 1 Reply Last reply
          0
          • T TNCaver

            Munchies_Matt wrote:

            I only do it if someone is paying

            Me too. Coding at home would be like a dentist going home every night and practicing on his family and friends. I don't deal with clients. I have never worked for a code-for-hire shop (and don't plan to start now). I code for the needs of the company I work for, their web site, their intranet, their windows services, and now, their Salesforce implementation (yuck, and one of many reasons I'm leaving after 17 years here).

            If you think 'goto' is evil, try writing an Assembly program without JMP.

            K Offline
            K Offline
            kalberts
            wrote on last edited by
            #30

            That is like a truck driver who doesn't own a car but walks to the supermarket and the movie theater. (Which is a good thing to do, but it might take the entire evening to get there.)

            1 Reply Last reply
            0
            • T TNCaver

              That's probably what I'll end up doing, though. I'm not a horrible programmer, I don't think I would have lasted 30 years in the biz if I wasn't at least decent at it (15 years is just how long I've been doing .NET).

              If you think 'goto' is evil, try writing an Assembly program without JMP.

              C Offline
              C Offline
              CodeZombie62
              wrote on last edited by
              #31

              Unless the potential hire has been self-employed, I think most employers are going to find that there aren't too many people who have any code samples that they can legally show to anyone. Here's a thought: maybe it's an ethics test. If you actually do show them code that you wrote for your current employer then you fail.

              1 Reply Last reply
              0
              • T TNCaver

                I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                If you think 'goto' is evil, try writing an Assembly program without JMP.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #32

                TNCaver wrote:

                Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company

                Put it on a stick, show it during the interview. No copies, they don't need the entire code-base to judge your skills - a minute worth of browsing would do. Then ask them if you should keep their code on a public github :)

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                1 Reply Last reply
                0
                • T TNCaver

                  I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                  If you think 'goto' is evil, try writing an Assembly program without JMP.

                  P Offline
                  P Offline
                  PSU Steve
                  wrote on last edited by
                  #33

                  I'd be in an even more difficult situation - all the code I've written in the past 15+ years is US Government classified SECRET or higher. There's no way for me to even get it on the unclassified net and if I tried I'd be off to the pokey...

                  1 Reply Last reply
                  0
                  • T TNCaver

                    I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                    If you think 'goto' is evil, try writing an Assembly program without JMP.

                    J Offline
                    J Offline
                    Jeff Moden
                    wrote on last edited by
                    #34

                    Heh... I'm looking at this site and see the following at the bottom of the thread list.

                    Quote:

                    Last Visit: 31-Dec-99 19:00 Last Update: 8-Feb-18 3:29

                    With that, the forum code also cutoff the "La" of "Last" when I block quoted and I had to correct it. Perhaps if people spent a little more of their own time learning the trade that pays them, these types of silly mistakes wouldn't happen. And that brings us back to the subject of the original post. While I do whole heartedly agree that your job shouldn't be your entire life (especially if you have kids or are married), you DO need to spend some time learning your trade and that's what employers want to see because they're tired of people that can't even get a bloody date right. While I also agree that you shouldn't have to keep up a web-presence or list your code on the likes of Git-Hub, you should be prepared for an interview especially if you have 15 years experience like the OP does. It will also show them good common sense and respect on your part if you tell them that you respect the proprietary nature of a previous company's code but don't let that be a barrier to showing your stuff. After all, you're on an interview to determine if you have the skills to do your job. And, no... the stuff you put on your resume isn't enough. That's just the proverbial "knock on the door". Too many people either exaggerate their knowledge or flat out lie on resumes. During one run of interviews of both experience web developers (with good knowledge of T-SQL) and DBAs (all claimed at least 10 years of experience on their resumes), 20 out of 22 couldn't answer the simple question of how to get the current date and time. I had originally started asking the question as a simple ice-breaker question to help the candidates relax. Little did I know it was going to me the litmus test for how the rest of the interview was going to go. Out of that same batch of people, only 1 DBA knew anything about how to do native backups and restores (and no... I do NOT ask for the precise syntax). One of the people also claimed to be an expert T-SQL performance tuner (again, with more than 10 years experience). When I asked him about clustered indexes (and, no, I didn't make this up. It's just too silly to even think of such a thing) he told me that he never worked with them because he had never worked with clustered servers. Employers are sick and tired of wasting time on people that don't actually have

                    P T 2 Replies Last reply
                    0
                    • T TNCaver

                      I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                      If you think 'goto' is evil, try writing an Assembly program without JMP.

                      R Offline
                      R Offline
                      RmcbainTheThird
                      wrote on last edited by
                      #35

                      I have always had a code portfolio that shows examples of my code and documentation. All of it comes from code I have written and various places I have worked and none of it reveals company information. Just pull a method from some class that shows how you have solved a problem such as transposing data from object to another or filling a list box. It should be the kinds of things you would do regardless of where you work.

                      1 Reply Last reply
                      0
                      • R Rage

                        Tell them you would show them after they showed you some examples of people they hired in their hobby time. If you have to prove how much you like your job outside of work hours, then HR should at least do the same for you.

                        Do not escape reality : improve reality !

                        M Offline
                        M Offline
                        MKJCP
                        wrote on last edited by
                        #36

                        Awesome! :laugh:

                        1 Reply Last reply
                        0
                        • T TNCaver

                          I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                          If you think 'goto' is evil, try writing an Assembly program without JMP.

                          K Offline
                          K Offline
                          Kirk 10389821
                          wrote on last edited by
                          #37

                          I would let them know those 2 facts, and ask if there is something else you can bring. They may simply want to see your coding standards in action. To me, the appearance of your code tells me a lot about the quality of your code. It also tells me a lot about how you communicate. Simply be prepared to find other ways to communicate. Also be prepared to discuss your code review processes, and your bug fix ratios. We strive for ZERO defects after release. But 1 defect in 3-6 months is acceptable. We can guess the stability based on the number of lines of code changed in the stabilization/test period before we go live. And I find it RUDE to ask for code that belongs to another client!

                          1 Reply Last reply
                          0
                          • T TNCaver

                            I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                            If you think 'goto' is evil, try writing an Assembly program without JMP.

                            J Offline
                            J Offline
                            Joe H Carron
                            wrote on last edited by
                            #38

                            Never share previous employers code -- I testified as an expert witness against a programmer that did share code and he got one yr and a felony charge. Also, as far as writing your own code I made the mistake of writing a working piece of code to solve their problem that they used and did not get hired. I will take their tests but provide no new code unless I get paid. The company was obviously looking for a code fix and not interested in hiring. I was not the first one they pulled this on I later found out.

                            1 Reply Last reply
                            0
                            • R Rage

                              Tell them you would show them after they showed you some examples of people they hired in their hobby time. If you have to prove how much you like your job outside of work hours, then HR should at least do the same for you.

                              Do not escape reality : improve reality !

                              T Offline
                              T Offline
                              TNCaver
                              wrote on last edited by
                              #39

                              :laugh: While that would be satisfying, I don't think it would win me any points. Besides, I am being contacted by the head of the IT department I'd be working for, and arranging the interview with his assistant. Looks like HR isn't involved for this one.

                              If you think 'goto' is evil, try writing an Assembly program without JMP.

                              1 Reply Last reply
                              0
                              • T TNCaver

                                I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                                If you think 'goto' is evil, try writing an Assembly program without JMP.

                                P Offline
                                P Offline
                                patbob
                                wrote on last edited by
                                #40

                                Unless you're going to throw together some code quickly for them to peruse, why not just tell them the truth -- you don't have a GitHub repository because your hobbies don't include programming, but rather you have hobbies that get you physically and mentally away from work as you find it yields a better work/life balance for you and helps keep you from getting burned out. Whatever you do, don't steal code from work and pass it off as yours, even if you're the only one who ever had a hand in writing it. Fact is, you sounds like you're currently employed, so you don't actually need their job. If they can't work with you on this point, are you sure they're someone you want to work for?

                                I live in Oregon, and I'm an engineer.

                                1 Reply Last reply
                                0
                                • F F ES Sitecore
                                  1. Create a repo on GitHub 2) Upload the following project

                                  public class Program
                                  {
                                  static void Main(string[] args)
                                  {
                                  Console.WriteLine("Hello, world!");
                                  }
                                  }

                                  1. Include it in your application 4) Profit
                                  T Offline
                                  T Offline
                                  TNCaver
                                  wrote on last edited by
                                  #41

                                  Oh yeah, there's the ticket. I could wow them even more by writing that in all the languages I know -- JavaScript, VB.NET, T-SQL, PL/SQL, PHP ...

                                  If you think 'goto' is evil, try writing an Assembly program without JMP.

                                  1 Reply Last reply
                                  0
                                  • M Member 11261991

                                    Do not, under any circumstances, give any code for a previous employer. Doing that is asking for trouble and may even be a trick question to see if you are reliable security person. If they cannot assess your abilities from the interview ,this does not speak highly for the company you applied to. If the interview went without anyone fron the SW Dept. being present is also a bad indicator. all in all, probably a bad employer.

                                    T Offline
                                    T Offline
                                    TNCaver
                                    wrote on last edited by
                                    #42

                                    I think I'm being interviewed by the head of the IT department.

                                    If you think 'goto' is evil, try writing an Assembly program without JMP.

                                    1 Reply Last reply
                                    0
                                    • J Jeff Moden

                                      Heh... I'm looking at this site and see the following at the bottom of the thread list.

                                      Quote:

                                      Last Visit: 31-Dec-99 19:00 Last Update: 8-Feb-18 3:29

                                      With that, the forum code also cutoff the "La" of "Last" when I block quoted and I had to correct it. Perhaps if people spent a little more of their own time learning the trade that pays them, these types of silly mistakes wouldn't happen. And that brings us back to the subject of the original post. While I do whole heartedly agree that your job shouldn't be your entire life (especially if you have kids or are married), you DO need to spend some time learning your trade and that's what employers want to see because they're tired of people that can't even get a bloody date right. While I also agree that you shouldn't have to keep up a web-presence or list your code on the likes of Git-Hub, you should be prepared for an interview especially if you have 15 years experience like the OP does. It will also show them good common sense and respect on your part if you tell them that you respect the proprietary nature of a previous company's code but don't let that be a barrier to showing your stuff. After all, you're on an interview to determine if you have the skills to do your job. And, no... the stuff you put on your resume isn't enough. That's just the proverbial "knock on the door". Too many people either exaggerate their knowledge or flat out lie on resumes. During one run of interviews of both experience web developers (with good knowledge of T-SQL) and DBAs (all claimed at least 10 years of experience on their resumes), 20 out of 22 couldn't answer the simple question of how to get the current date and time. I had originally started asking the question as a simple ice-breaker question to help the candidates relax. Little did I know it was going to me the litmus test for how the rest of the interview was going to go. Out of that same batch of people, only 1 DBA knew anything about how to do native backups and restores (and no... I do NOT ask for the precise syntax). One of the people also claimed to be an expert T-SQL performance tuner (again, with more than 10 years experience). When I asked him about clustered indexes (and, no, I didn't make this up. It's just too silly to even think of such a thing) he told me that he never worked with them because he had never worked with clustered servers. Employers are sick and tired of wasting time on people that don't actually have

                                      P Offline
                                      P Offline
                                      patbob
                                      wrote on last edited by
                                      #43

                                      Jeff Moden wrote:

                                      While I do whole heartedly agree that your job shouldn't be your entire life (especially if you have kids or are married), you DO need to spend some time learning your trade and that's what employers want to see because they're tired of people that can't even get a bloody date right.

                                      I don't know about you, but I wouldn't wan't to show anyone the code I write when I'm learning something. Its typically code of the worst sort because it is one time use throw-away code. Maintainability and elegant design are not the focus, learning is. I find that maintainability, elegant design and polish are my value add -- they're what I can bring to the table beyond simple mastery of the topic, but they don't really kick in until the third project I do, and by then, I'm typically doing it for an employer and don't retain any rights to that work.

                                      I live in Oregon, and I'm an engineer.

                                      J 1 Reply Last reply
                                      0
                                      • T TNCaver

                                        I've received an email from a prospective employer inviting me to set up a job interview. A note at the end requests a link to my GitHub code repo or sample code/projects prior to the interview. I don't have a personal GitHub repo or code samples because, unlike probably most here, I no longer do programming as a hobby on my own time. Everything I've done in the last 15 years that the interviewer would be interested in is proprietary code I've written for my current employer, and I don't feel comfortable sharing that outside the company, even though the two industries are not related by any stretch of the imagination, so they wouldn't be able to benefit. What would you do in this situation? Rewrite some of your code to remove any hints of its purpose or value to your employer? Write new code?

                                        If you think 'goto' is evil, try writing an Assembly program without JMP.

                                        U Offline
                                        U Offline
                                        User 12817778
                                        wrote on last edited by
                                        #44

                                        Ask them for a problem, and solve it in front of the interviewer. If the interviewer doesn't praise your idea, don't even consider applying for such a company.

                                        1 Reply Last reply
                                        0
                                        • P patbob

                                          Jeff Moden wrote:

                                          While I do whole heartedly agree that your job shouldn't be your entire life (especially if you have kids or are married), you DO need to spend some time learning your trade and that's what employers want to see because they're tired of people that can't even get a bloody date right.

                                          I don't know about you, but I wouldn't wan't to show anyone the code I write when I'm learning something. Its typically code of the worst sort because it is one time use throw-away code. Maintainability and elegant design are not the focus, learning is. I find that maintainability, elegant design and polish are my value add -- they're what I can bring to the table beyond simple mastery of the topic, but they don't really kick in until the third project I do, and by then, I'm typically doing it for an employer and don't retain any rights to that work.

                                          I live in Oregon, and I'm an engineer.

                                          J Offline
                                          J Offline
                                          Jeff Moden
                                          wrote on last edited by
                                          #45

                                          Yeah... strongly agreed. You mistook what I said. It's not the "learning" code that they want to see. They want to see that you're taking the time to learn. Once you've learned how to do something, then turn it into a formal but still personal bit of code and use it as an example of your work. I totally agree on the ideas of maintainable code, elegant design, and polish will set folks well apart from those that don't practice those ideas. Again, the chance to shine in those areas is the demonstrable code you send them when they request it. Of course, this should be YOUR code... not the code that an employer has proprietary rights to or anything else that would violate an NDA, Covenant not to compete, or ethics in general.

                                          --Jeff Moden

                                          P 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups