Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Businesses Programming IT

Ask Slashdot: How Can You Apply For A Job When Your Code Samples Suck? 408

An anonymous Slashdot reader ran into a problem when looking for a new employer: Most ask for links to "recent work" but the reason I'm leaving my current job is because this company doesn't produce good code. After years of trying to force them to change, they have refused to change any of their poor practices, because the CTO is a narcissist and doesn't recognize that so much is wrong. I have written good code for this company. The problem is it is mostly back-end code where I was afforded some freedom, but the front-end is still a complete mess that doesn't reflect any coherent coding practice whatsoever...

I am giving up on fixing this company but finding it hard to exemplify my work when it is hidden behind some of the worst front-end code I have ever seen. Most job applications ask for links to live code, not for code samples (which I would more easily be able to supply). Some of the websites look okay on the surface, but are one right click -> inspect element away from giving away the mess; most of the projects require a username and password to login as well but account registration is not open. So how do I reference my recent work when all of my recent work is embarrassing on the front-end?

The original submission's title asked what to use for work samples "when the CTO has butchered all my work." Any suggestions? Leave your best thoughts in the comments. How can you apply for a job when your code samples suck?
This discussion has been archived. No new comments can be posted.

Ask Slashdot: How Can You Apply For A Job When Your Code Samples Suck?

Comments Filter:
  • by JDAustin ( 468180 ) on Saturday October 14, 2017 @11:45PM (#55371051)

    And therefore taking it with you would be illegal?

  • by Anonymous Coward on Saturday October 14, 2017 @11:47PM (#55371059)

    Generally, code that you wrote for pay does not belong to you, so you won't be able to submit it as a code sample anyway. So write some open source software, and write it as well as you are able. Then you can submit that.

    • Generally, code that you wrote for pay does not belong to you, so you won't be able to submit it as a code sample anyway. So write some open source software, and write it as well as you are able. Then you can submit that.

      exactly, unless you have explicit permission to share and show that code from work it aint yours to show to a new prospective employer. If you need code then contribute to a open source project or write something at home that demonstrates your good coding practises. I have moved out of coding now but when I did I always demonstrated home projects as I don't have the right to keep let alone show code I wrote for other employers.

    • Came to say this.

      1. Your company's code is your company's code. You don't get to hand it out.
      2. What would be the point of showing them a page with a bunch of code written by some else?

      Write your own code... an API, a full (simple) app, whatever. Document it well, attribute any help from others, put it on Github, host it somewhere like AWS, Google Cloud, or Heroku if you want 'live code'.

  • Ignore them (Score:5, Insightful)

    by khchung ( 462899 ) on Sunday October 15, 2017 @12:02AM (#55371097) Journal

    Most job applications ask for links to live code

    In nearly all companies, what you wrote as part of employment is owned by the company. So asking for live code from job applicants is no different from asking for trade secrets, and there should only be one respond:

    "It is both against my ethics and my employment contract to show any of my employer's code to you, but I can tell you my code is being used in production capacity in my employer servicing business function X, Y and Z. I am happy to provide codes which I do own so you can judge the quality of my work."

    Essentially, you ignore the unreasonable requests and provide a reasonable alternative. Any company that rejected you for that, you wouldn't want to work there anyway, who knows what further unreasonable/unethical request you would get if they became your boss.

    • Re:Ignore them (Score:5, Insightful)

      by dgatwood ( 11270 ) on Sunday October 15, 2017 @12:14AM (#55371143) Homepage Journal

      Actually, the only correct response is to hang up the phone.

      Employers might ask you if you have any open source code on GitHub or something, but beyond that, no legitimate employer should ask for examples of recent code unless you're a new college hire, for precisely this reason. Forget about whether they would still hire you if you say no. Any employer that even asks should be immediately disqualified from consideration.

      • dgatwood,

        I could see an employer asking this question as a way to ascertain what the applicant's moral character is.

        I thought the response by khchung was perfectly worded - you're not going to violate any laws or ethics by providing a previous employer's intellectual property. But, you're happy to provide samples of your own work that you have created on your own.

        If a programmer can't provide code they've written on their own, I would tend to doubt their skills in exactly the same way I would doubt the ski

        • Re: (Score:3, Insightful)

          by dgatwood ( 11270 )

          If a programmer can't provide code they've written on their own, I would tend to doubt their skills in exactly the same way I would doubt the skills of a musician that couldn't provide proof that they practiced their instrument on their own time but wanted to be hired based on the recorded work done with other musicians.

          I haven't kept a practice log since I was in elementary school, and I don't know very many musicians that do. That doesn't mean we don't practice. That said, I'm assuming your intended poi

        • If a programmer can't provide code they've written on their own, I would tend to doubt their skills

          So you wouldn't hire a Cobol programmer if he didn't have his own mainframe is his garage? Would you hire an aircraft mechanic who didn't have a personal 747 to tinker with?

      • Actually, the only correct response is to hang up the phone

        Not quite. These kinds of stupid questions are often asked by HR drones and often don't in any way reflect the operation of the company itself.

        • Bull shit. Those companies are paying their salaries, so they clearly support their actions (in the only way meaningful within capitalism, let alone by a corporation. When you do something for money for someone, you represent them. This is not hard. Neither people "just following orders" nor corporations "unaware of the actions of their employees" deserve a free pass, period.

          Here is a suggestion for cleaning up corporate malfeasance: hold managers legally responsible for the actions of their employees, and

          • Suggest multiplier less than 1. That's what I get fore trying to be terse since I an on my phone due to fire related internet outage

          • Bull shit. Those companies are paying their salaries, so they clearly support their actions

            Depending on the size of a company there's a lot of people getting salaries without anyone ever knowing what their actions were, and this is especially true of departments so completely isolated from operational matters (about the only thing a company ever focuses on) as HR.

            People go to HR with problems. People don't go to HR to review HR.

            When you do something for money for someone, you represent them.

            True, but only as far as your own area of competence. If a legal employee asked that question then you can start questioning the company. If some HR drone who's never talk

    • Not so fast (Score:5, Interesting)

      by emblemparade ( 774653 ) on Sunday October 15, 2017 @02:37AM (#55371543)

      I work for a respectable company and all our code is Apache licensed (open source) and publicly available. Anyone can see my code.

      Let's not jump to conclusions and assume that OP is breaking the law.

      That said, my advice to OP is to contribute code constantly to open source and free software projects. This is very impressive to employers for various reasons: 1) it displays your passion-driven, good quality code, in projects that you yourself chose, 2) it shows your delight in code itself, rather than profit, 3) it proves you're ambitious enough to work after hours to further your career.

      I hire people, and let me tell you that people listing several open source contributions (including their own independent open source projecs) always jump to the top of the stack.

    • This. Plus bring some of your attitude with you. The people who write the job adverts are probably HR drones or recruiting consultants, and not the people who will interview you, or work with you.

      I remember being given a coding test as part of a job interview. One of the questions involved parsing a long expression in 'C' without brackets. My reply was (a) no-one ought to write code like this; (b) I can probably remember or guess the precedence for the weirder operators, such as bitwise XOR, but I wouldn

      • by Cederic ( 9623 )

        I can probably remember or guess the precedence for the weirder operators, such as bitwise XOR, but I wouldn't trust my memory

        I can mostly remember precedence operators for the main languages I've used, but when you've created production code in 7 languages and played around in half a dozen more, it's pointless trying to remember them all.

        So add the brackets. Make precedence explicit in the code and it's easier to read, easier to edit and easier to validate. Even if it's someone else's code.

  • Lots of good points about the possible legal issues of pointing to your existing/previous employer's code from the perspective that a) you don't own the code, b) your disparaging a company's product (which you may not be allowed to do because of past employment agreements) and c) I'm not really sure that you can easily prove that you wrote it in the first place.

    Instead, if you think you're a Hotel Sierra coder, create a relatively simple app - it doesn't have to be brilliant in concept but use it as an oppo

  • if you were working for a company, your code is proprietary. You can't share it.
    Simple answer: you can't legally share your code.
    If they balk, tell them they are being unprofessional.
    In 32 years I've never been asked to provide code. Good thing with the number of NDA's I've signed.

    If they're asking you to write a code sample, that's a different story. Make something up.
  • by mykepredko ( 40154 ) on Sunday October 15, 2017 @12:47AM (#55371227) Homepage

    This is a re-iteration of a reply elsewhere in this thread.

    I think a reasonable analog would be in terms of musicians - would you hire a musician based on the work of the band they were in or would you want them to audition for you?

    The obvious example would be if you were hiring a musician based on them being an ex-Beatle would you be as happy with a Ringo as a John, Paul or George? How would you feel if you got George based on what you heard in the albums and later found out that Eric Clapton played some of the guitar attributed to George on the albums?

    As an employer, I would want to see what the applicant could do as an individual contributor to show that they have the required technical chops and then use the interview process to determine whether or not they fit in with the company/team.

    Doesn't matter if it's a musician or coder.

    • by lucm ( 889690 )

      if you were hiring a musician based on them being an ex-Beatle would you be as happy with a Ringo as a John, Paul or George?

      Trick question. Do you mean the real Paul McCartney, or the guy they hired to impersonate him after his death and who turned out to be immensely more talented than the real Paul?

  • Code samples don't have to be from your job. Have a hobby programming project, and use that for your code samples.

    • Code samples don't have to be from your job. Have a hobby programming project, and use that for your code samples.

      Or: use it as a filter to remove companies that suck. Which is sadly, apparently most, but it's worth doing. Providing code samples for all but the lucky few requires a seriousl legal and ethical breach or requires you to basically not have a life outside code.

      Most pros I know do their coding at work then relax in their time away doing something else most of the time.

    • Is your hobby (say, html5 games) relevant to the job you're doing (e.g. stock control) and the job you're applying for (e.g. warehouse automation)?

      If it isn't there's not much point showing it.
      If it is then it's not much of a hobby.

  • You don't have code samples, but what you do have are a very particular set of skills. Skills you have acquired over a very long career. Skills that make you a nightmare for bugs in other peoples convoluted code...

    Few people get a clean environment in which to create pristine code from scratch, be proud of how you have shone a light into some dark places, made things work where others couldn't find the problem and made the world a better place one line of code at a time

    Oh, and for sure write some of your ow

  • 1) Write code that solves a problem. In your job, you must have thought a few times, "Someone should write code to that does such-and-such." Ok, for your project, write that code. The interviewer will be more interested in your code, if they want to use it themselves.

    2) Make sure that your code is secure. Don't tell the interviewer, "This code assumes that the input data has previously been checked." No - your code should check the input, and reject any bad input.

    3) Before the interview, make sure that you'

  • by RightwingNutjob ( 1302813 ) on Sunday October 15, 2017 @02:41AM (#55371555)
    We needed to hire another coder a few years back. One of our greybeards said, "don't just look at resumes and gauge the firmness of their handshakes, make them take a coding test." So I wrote one up that specifically tested the skills we needed the new pair of hands for that fit onto six pages of good old-fashioned paper.

    We got six bites for the position through our usual staffing firms. Three were kids barely old enough to go drinking with, so they're out because we needed someone to work, not to be taught to work, and three guys with about a decade plus. All three had impeccable resumes.

    The first guy could barely figure out which way was up on the pages I gave him. The second figured out which side of the page was up but promptly got more than half the questions wrong. The last one promptly got slightly less than half the questions wrong. That's the guy we went with, and we lucked out because he learned quickly and has done good work for us.

    The first guy, in the process of revealing to us that he couldn't tell C++ from a hole in the ground also came up with this gem among his many grumblings: "This code test is awful! You could get someone at way less than my rate to come up with it!"

    The moral of this story: we've all interviewed Guy Number 1 at some point in our careers. Complaints about other people ruining your work and not being able to provide code samples because whateverwhatever will set off alarm bells. You need to prove you can code by yourself. If that means something as simple as maintaining a personal webpage where you just experiment with stuff, do it. If that means contributing to OSS, do it. If that means offering to take any and all code tests during an interview, do it. But what you don't want to do is start the interview with whining and complaining. Even if you're right, you'll be lumped in with all the jackasses that are all bluster and no technical competence and you won't even make it to the interview.
  • In many companies even the meaningless codename of the project you worked on is under NDA. Do what everyone else does and just describe what you did in vague terms like the technology used, and value to the company. Yes, it may have been a mess, but it was used by the client and may have delivered millions in value to the company. That's what matters in this industry. There are many total garbage pieces of code out there that rake in gazillions for companies. Also, there is an enormous amount of developer j

  • Comment removed based on user account deletion
  • What does your current employer think of you sharing _their_ code with the competition?
    Will your potential new employer not think that you'll steal _their_ code as well to brag for a new employment down the line?

  • Many, though not all, workplaces will work with you when you sign their employment contract to exclude company ownership of previous free software and open source software. Many, though not all, will also work with you to allow you to publish patches to the upstream owners of copyrighted free software, to avoid GPL confusion and to get the patches into the next official release. If your current workplace isn't clear about permitting such work, spend an hour with an attorney familiar with intellectual proper

  • How about "you write better code samples"? I guess I must be some kind of genius to figure that one out. It's either that, or the OP facing some mental challenges.

    It's not a good idea to show samples from work anyway. At the very least you need to ask for permission, and that tends to start a process that ends with you leaving, whether you have a new job lined up or not.

  • 1) you shouldn't be showing ANY code samples from a current job (unless it is open-source licensed). that stuff is proprietary and for many companies, HIGHLY confidential. It leaks copyright, and possibly potential patentable materials. In most big companies, that's grounds for more than just getting fired, but getting sued, too.

    2) this is why you should be doing your own "home" projects. make an app, a back-end, a docker instance, anything, that you can share that is yours...especially if you open-source l

  • Specify in your cover letter that you have to give samples because the back-end stuff, where you were able to follow best practices, is owned by your company and your front end code wound up going through a process that pretty much turned it into garbage. Give them links to the stuff you worked on that is live, but also the samples, and you'll be on your way.

    If you're any good - I mean, literally, if you have a pulse and don't scream and hurl feces during your interview and demonstrate that you know at leas

  • ... but if you can't infer my skillset from my code and what I have to tell about it, I don't want to work for you. If you judge my skills by the amount of commits or the amount of lines in a given set of repos, you're an idiot, plain and simple.

    With modern PLs there are as many coding styles as there are coders. We get into religious wars over indent, bracketing and tabs versus spaces. Any judge over my code who isn't aware of this bias inherent to all of us is utterly unable to judge code at a cursory gla

  • A lot of the developers I'm asked to review have github repos now, with open source contributions or their own personal projects. We still talk to them a bit to verify that they actually can do the kind of work that we see in the repos. We also understand that not everyone has a github repo or code they can actually show us, and the interview really doesn't change that much if they don't. We're still going to ask some technical questions as well as try to evaluate whether we think they'll fit in well with t
  • Never once have I seen this.

The use of money is all the advantage there is to having money. -- B. Franklin

Working...