 Hi, my name is Ted Stressenreuter, I'm the CTO at SecretSource. What you're about to see is a clip from a pair programming session we recorded during one of our, during our interviewing process. The candidate, Terry, describes the things that he would like to improve in the code that he produced. Terry's a mathematician, but he's worked most of his life as a programmer. And following an event in his personal life he decided that he wanted to go back to work following several years of semi-retirement. Also in the clip is Israel, Israel is a C-sharp programmer as well, and he's acting as the code reviewer. The project, the sample project that we ask candidates to work on is called Bikes Anonymous, and it's a fictitious license issuing or certification entity that issues certifications for cyclists all over the world. In the video Terry goes into, describes in detail some of the things that he would like to fix in the code itself, and it's important to understand that in the sample projects that we ask people to work on, we ask them to only spend three or four hours maximum working on the code. We don't want to see perfectly finished projects because we know that that's not very reflective of reality. And what we would like to see, what we are interested in seeing is how well people are able to refactor their code or to find mistakes or even just anything that could possibly be improved and how they would go about doing that. Along the way, while Terry is explaining what he wants to fix, I'm taking notes, although you can't really see it, I'm taking notes about things that he's saying that demonstrate a certain level on a professional ladder. And you'll see some of my notes in this video to get a sense of what I'm thinking and the kinds of things that are reflective of somebody's level. So without further ado, I present to you Terry and Isael. Enjoy. So the next thing I had on my list, I'm just looking across here, is I've got cyclist ID as a sort of unique identifier for a cyclist in a cyclist. That's it, the cyclist class. The cyclist class. So you say it's got ID at the top. At the top, ID, OK, sorry. So that's designed to be a unique identifier. But without a database saving data, it's not going to work very well. So I did a sort of kind of like a bodge. Do you know that word? A sort of a quick and easy fix to try and generate unique IDs. So I made a static variable that just got incremented every time it found a new cyclist. But it's not the way it should work, really. It should be unique ID, like a database, a key for a table, you know, a key ID for a database table. And that's what it's designed for, just to uniquely identify cyclists. But because I didn't have a database part, I sort of did a work around for it just so that it worked. OK. Yep, no, no, I'll work. And I made a note that it wasn't a spec that it's a multinational company. So it should be able to deal with many languages and in particular, many currencies. But for simplicity, I just made everything in one currency, which I called euros. OK. Did you have do you have that abstracted out at any point or did you just just hard code that? I think it's just hard coded. Yeah, it would be very good to abstract that out into, you know, there's a lot of things that really need abstracting out in the refactoring process. So what else we got? There's a cyclist class again, has an ID dock number. About halfway down, which I've just called a UINT. But obviously not all. It's designed to be like a passport number, for example. OK. But obviously, not all IDs are just purely integers. The Spanish need, for example, and if, for example. So that that probably needs changing at some point. OK, do you have a preference of something you would like to work on right now? Do you have some ideas in particular? Well, yeah, there's a few things. There's a few things that would be nice to do. There's the CSV parser, which I created. For one thing, Israel probably knows better than me. There might already be one that I could have used. But I just wrote it from scratch because it seems fairly easy. But it would be a nice kind of utility class to abstract that out and make it a bit more generic so that you could, for example, pass into the constructor the number of fields and the field types and perhaps the ranges as well. And then it would just, you know, you could it would be more able to do work on other CSV files, which would be quite useful. So that would be something that would be nice to do. And then the other big thing for me is that the bikes are nonclass is too big. It's just kind of like the top level class that does a lot with the work. It's too big and too generic. And a lot of that stuff needs abstracting out. And one example would be all the email and stuff that there should be it's all done in. This is typically what happens to me. I sort of build things from the bottom up. And when you're running out of time, you end up dumping a lot of things into the top level class just to make it work. And then ideally you'd revisit it later to sort of simplify it a bit because I think the class is too big. So all the emailing stuff could go into an email subclass. That's something I'd like to do. And also the HTML and PDF stuff, I think, similarly could go into and that could possibly go into a static sort of utility class that you could use elsewhere again.