Contract Work

Showing posts with label software development. Show all posts
Showing posts with label software development. Show all posts

Friday, July 29, 2016

Remote Non-Senior Developers, Part 2: What You Should Consider


Part 1 of this post was all about what companies need to consider and think about when hiring a remote developer. It's just as important for folks considering being a remote developer to think about a few critical pieces as well. Real talk time... Not everyone is cut out to be a remote worker regardless of your level of expertise. Some days are great and some are really challenging. If you're a non-senior considering remote work you need to be BRUTALLY honest with yourself because if you're not and you actually wouldn't be a great remote developer then it'll actually be you who suffers the most. So what are those things you should think about? 
  1.  Are you a self-sufficient worker? As a remote worker you need to set up a schedule for yourself and get into a routine. You need to push yourself through the days where you're tired and a little checked out. And you need to be filling in the gaps. Working on an issue and stuck but no one is free to pair? If you twiddle or thumbs or go watch tv, remote work is not for you but if you say to yourself, "ok, I can't figure out this problem but it has to do with ______. I'm going to read the docs, find some blog posts, or find a conference talk to watch until someone is available to pair" then you're on the right track. 

  2. Can you boldly, bravely, and shamelessly ask question? This is the most difficult part. You can't be fearful and let imposter syndrome take over because you'll never get anything done. When you're stuck, no one can see that you're stuck or maybe frustrated. You can lean over and say "hey, can you check this out real quick?" You've gotta announce it in a slack channel. And sometimes that sucks but it's important! When I began, I made it a goal to ask 100 questions a week so that I could frame asking questions as a positive thing. It wasn't something I needed to do because I didn't know anything, it was something I had to do to learn and accomplish my goals. 

And finally, what structural pieces can you put in place to help you be successful.
  1. Coworkers to work with. But you're remote you say? How would this happen? Well, there are lots of other remote workers as well! I generally try to cowork at least once a week preferably with a group of ruby developers. There's no doubt in my mind that you do miss some learning when you're not in an office. You miss overhearing snippets of technical conversations or jumping into a conversation because it sounds interesting so try to creat that for yourself.

  2. Regularly scheduled pairing sessions. As I got more experienced and started working on more challenging tickets, I would get stuck (as everyone does). Additionally I try to take a "challenge ticket" every week. Challenge tickets are tickets that are just above my skill level. I know they're within reach but I can't quite wrap my head around how to start them or what an effective plan of action would be. They're tickets I have to pair on. We have a pretty small team so sometimes there wasn't anyone free to help. I decided to set up scheduled pairing times. I have one hour a week with two coworkers that is in the calendar to ensure the time is blocked. The time can be used to ask some quick questions and get a few tickets out the door, work on a challenge ticket, or pair on something they are working on. And sometimes we cancel it if it's not needed but the point is that it's there, blocked off. 

  3. A regular way to evaluate yourself. I try to do weekly personal retros which is something I noticed a coworker doing. He just reviews 3 things; liked, learned, lacked. I keep these documented in Evernote and they're a great way to looks back and see all the things that have been going on. 

I hope you've enjoyed this short series and it's given you some good information to consider. Again, here are the slides from the original talk.

Friday, July 22, 2016

Remote Non-Senior Developers, Part 1: What Your Company Should Look For

When I tell developers I meet at conferences or elsewhere that I transitioned from a career in nonprofit management to becoming a software developer I usually get smiles. And then, when I add that since becoming a Dev I've only worked remotely, the smile changes to skepticism. I understand hat skepticism. People have views of what will help a junior Dev be successful, some companies have had bad experiences with non-senior remote developers, and there are lots more stories out there. But as remote work and distributed teams become more prevalent in the field, companies shouldn't feel like they can't hire, train, grow, and mentor less experienced developers as a result. Last month at the United Silver Spring Ruby meet up, I spoke about being a non-senior remote developer (note: non-senior does not explicitly mean junior although I was a remote junior developer). Folks of all experience levels were interested to hear what I had to say because many can't envision what a non-senior remote teammate might look like. Here's s little bit about my experience, what I think makes a successful remote non-senior Dev. Part 1 will cover what a company should look for when considering hiring someone and then part 2 (coming out next week) will go over what a less experienced developer should think critically about before deciding to go remote. 

I won’t lie to you. It does take a special type of person to be a remote worker regardless of their level. This is why some companies decide not to have remote employees at all. And it is a little riskier to hire a remote worker with less experience because do can have a higher risk of not being successful if they are not great (I say great because they do need to be better than good) at the things that make remote workers of any level good remote workers. Here are some characteristics you want to look for when hiring for a remote non-senior developer. 

  1. Someone who takes initiative. There are going to be bumps and issues and as a non-senior dev. In order for the employee to learn and grow as much as they possibly can, they’re going to need to make some decisions, put improvements in place, and get the rest of the team on board with what they need. Make sure that as a company, you look for someone who has done this in the past or has the potential to do this.

  2. Good communication skills. This is necessary for any developer but especially when remote. How can they articulate their thoughts, the research they've done, a problem they're facing, etc. 

  3. Learn about their past. Are they a new professional or just new to development? When I became a developer I had about 7 years of prior professional experience and had already been working from home for 2 years in different industries successfully. I might not be a senior developer technically, but I’ve got all the other skills necessary to be successful.

  4. Make sure the person understands what remote work is all about. Ask them about the best and worst parts of working remotely. I don't like working remotely because I can work in my pjs (which I don't do, for the record). I like it because I have a schedule, more work time without a commute, and a quiet distraction-free workspace. I also have opinions about the parts of working remotely I don't like. I’m aware of all the good parts and bad parts of remote work and I know what i’m getting into when I accept a remote position. You want to ensure you’re hiring someone who also understands these aspects or has at least thought through them.

  5. And maybe most importantly, someone who isn't afraid to say to a slack channel that they are stuck, frustrated, or need help. Without this personality trait, the individual won't be successful because asking questions is probably the most important skill a developer can have.

I find the best way to learn about all of the characteristics above is to ask behavioral interview questions. Instead of the interview where you decide if you'd like to chill with the candidate, ask about scenarios. For example, tell me about when you were stuck on a problem, what did you do? What if no one was available to help you? What was a time you had an issue with a teammate, how did you address it and how was it solved (if at all)? 

Now finding the right candidate is half the battle, but you also want to make sure they’re set up for success. A person isn't an island. They can only exist and thrive if they're put in an atmosphere to do so. Companies sometimes feel they don't have enough resources or structures in place to support a non-senior person but if you have the right candidate, you actually just need a few small things to ensure success.

  1. A good manager who has had some experience/training. This person will be vital for support and working through issues that may come up on the team. They should be an ally and be able to recognize when issues are actually opportunities to help the team as a whole grow and learn more about things like diversity, empathy, mentorship and more. 

  2. A kind, caring team. It is easy as a non-senior Dev to be scared of asking questions but if the team they are put on is supportive, thoughtful, positive, and constructive it will really go a long way in creating an environment with lots of psychological safety where it is easy to learn. 

  3. A system of regular check-ins. It's great if you have a good manager but that manager (or even a tech lead) need to be regularly checking in with this person, especially at the beginning. I think 1-1s are a vital part of a healthy team culture regardless of experience level or if folks are remote, but it’s even more important when you don’t see each other every day in person.

  4. A partially remote team. Even if your current team of remotes are only senior, having a partially remote team means you understand some of the baseline difficulties of remote work regardless of level. It also hopefully means you have some processes in place to allow for easy, async communication and remote pairing tools that are widely used and understood. I'm not saying it won't work if your first remote hire is non-senior but it's definitely going to be a steeper mountain to climb. 


That's it. Really not as involved as you thought it'd be, is it?

Here are the original slides from the talk I gave: https://speakerdeck.com/asheren/remote-non-senior-developers

Stay tuned for Part 2 next week.


And if you’re interested in hiring a remote software developer or want to speak more about the points made here, get in touch!

Monday, July 11, 2016

Technical Interviews - A Revised Process

I recently attended a handful of conferences, some of which I’ve spoken at. A topic that is frequently discussed based on the research I’ve been doing in regard to the the benefits and challenges of being a parent and developer is technical job interviews. More specifically, people focus on the questions of what do companies ask? What do they expect?  And how well do these processes actually asses an applicant’s ability to do the job? One of the things I’ve found in my research is that parents have difficulty showing what they are capable of because they have less time to contribute to open source and side projects. The proliferation of take home code challenges as a response to the backlash against white boarding in interviews has solved some problems but created others. Giving a large chuck of focused time and attention outside of work hours to accomplish a code challenge is often difficult for parents, caregivers, or people who have significant outside-of-work responsibilities. As a result, I’ve done a lot of thinking and discussing about what an effective interview process might be, especially for developers with 2-3 years of experience.

I started by thinking about what I do at work. I refactor (a lot). I research (a lot). I learn (a lot). And I work through understanding code that other people wrote (a lot). What I don’t do a lot is code from a blank page. Companies always say that they just want to hire people they know can solve problems and can learn. From what I’ve heard, most technical challenges don’t really accomplish this. I’m not saying the methodology below is perfect but I think it comes closer to a solution where unconscious biases and the dependence on a significant amount of free time are less of a factor while still showing technical capabilities.

Here is what I suggest an interview process contain. Ideally this would be broken up into a short (1.5-2 hours or less) take home portion and an in-person or virtual conversation in lieu of a pairing session and/or take home code project. I think I see the first three items as ideal for a take-home portion and the last two as either take home portions with additional discussion or fodder for some fantastic technical conversations.

1. Breaking apart a problem or feature. 

One skill I find extraordinarily useful in my day-to-day experience is to be able to break apart a problem or feature. I’m often looking at issues and asking additional questions based on my knowledge of the codebase, and making sure that something doesn’t strike me as problematic within the context of a solution. An example to use in a challenge could be technical, but that may be difficult without a lot of domain knowledge. Keep in mind that an interviewer can also tell someone’s prowess for problem-solving by giving a candidate a scenario that is completely unrelated to tech. How do they reason through it? What pieces does someone highlight? What additional questions would they want to ask? If it seems applicable, what might a diagram of the solution look like? All of these reasoning come into play really often, especially for developers who have 2-3 years of experience, oftentimes a group that is looking to grow in this area and understand what additional questions and considerations more senior developers ask when solving a similar problem.

2. Research a topic, library, or other implementation strategy. 

This is a great one because we look at this stuff all day long. Developers hear about new tools at a meet up and think about if it’s applicable or if it could help their company in any way. During the day, developers are asked about a feature or functionality and want to see what’s out there and what might be worth implementing or do you want to roll your own? Having to do this research, including listing potential pros and cons, commenting not only on the result but how a candidate came to that conclusion is really powerful. A candidate could include what they read, where they looked, how they got started and more! They could also not include these things which would also be extremely telling in an interview. Ultimately, the “right” answer might depend on project context but this would tell the interviewer a lot about what they might do on the job and how much confidence you could have in something they recommended. Finally, one of the things I love about this question is that it is scalable to every level since you expect junior developers to evaluate possible items differently than a senior developer might.

3. Provide an explanation for something. 

Oftentimes at work, developers are helping to teach each other and learn from one another. I think great code reviews sometimes include a person commenting “what’s this?” or “I haven’t seen this design pattern before. Can you explain it a little further or provide some learning resources?” Most companies want to make sure they’re hiring a team player, someone who isn’t just writing code but contributing to an overall positive culture for a team. For this, I’d suggest a simple term (not some complex process that has lots of different polarizing opinions surrounding it), possibly something related to the company’s codebase that they’ve found new people coming in don’t have lots of experience with or that they need to be taught. Make sure to say it’s okay to google and use resources if a candidate needs to (I assume that a good answer to this question will likely site at least one or two different resources). As an additional consideration, I’ve talked about the importance of actually interviewing for mentorship if that’s something your company values. In this case, if mentorship and team learning is a company or team value, a company interviewing might ask for two different explanations… one that someone would provide to peers at a similar experience level and one that would be a more appropriate explanation to a junior or brand new developer. This is also a great way to get other people on the team involved in the interview process. Show a couple of teammates at these levels the explanations (without the candidates name, if possible) to see if they understand them.

4. Refactoring

We all know that this is what most developers do every day. We refactor. We solve bugs, we tweak features, and we refactor. I LOVE refactoring and I like to think most other developers do as well so provide that as a technical challenge, or even something to pair on. Provide either a method or a file with some code you, as an interviewer, would consider dirty, smelly, ugly, slightly confusing, or whatever other adjective you want to use for it and have the candidate refactor it. You can see their thought process when approaching code, you can probably have a really amazing conversation about this thought process, methodologies used to refactor, different ways of refactoring, and more. If you’re providing a file or more than one example, let the interviewee pick where to start. Again, while this can be a portion of a take home assignment, I think both interviewer and interviewee will get more out of the exercise if they’re doing it as a part of a conversation and it also helps the company interviewing be mindful of outside time spent on challenges.

5. Tell me what this file is doing.

Finally, the last item on this list is a blanket- what is this file doing? How many companies have big, complex monolith applications at this point? And how many times do you spend time during your work day working through code, figuring out what’s going on? This is another perfect example of something that can spark a great conversation, show an interviewer how a candidate goes about figuring these problems out (there are a variety of ways to do this) and this skill likely directly affects a person’s ability to accomplish the job successfully. Another super scalable activity because you can show files of different complexity levels to different candidates based on their number of years of experience.


Again, I’ve written these suggestions as good options for mid-level developer interviews, but, as I mentioned specifically in a few points, they could be altered slightly to be applicable for interviewing at any level. What do you think? If you interview, do you employ any of these strategies? If you currently depend on long (I define long as anything over 3 hours, even for a junior level developer) take home challenges, would these alternative “assignments” help you asses a developer more effectively when looking at their everyday responsibilities?

And if you do interview like this (or would love to test it out), I'd love to talk because I'm looking for my next great career opportunity. Get in touch.

Thursday, June 23, 2016

Write/Speak/Code: the conference highlights

Last week I attended Write/Speak/Code for the first time. Now, I’ve attended a good amount of conferences. I find most of them pretty interesting, I always learn something, but I was blown away at how much I was able to take home from this conference. From the pedagogical approaches to the actual content to the awesome women I met, this is a conference to keep your eyes open for in the future.

I took a grand total of 20 PAGES OF NOTES, so this is going to be my attempt to recap what went on. I want to start by saying that I’ve never been to an all-female conference and honestly wasn’t sure what to expect. I have a lot of male friends and so it wasn’t really until I entered this industry that my “otherness” of being a women became a thing. I have to say that it was actually really awesome. It is so rare that you’re in an entire room with smart, technical women respecting one another. I think, as a result, this conference had a very different vibe and the interactions I had with everyone were just lovely.

The sessions were quite interesting. I decided to participate in the alumna track since I’ve already done a fair bit of conference speaking. The alumna track was focused on leadership development, self care, and personal realizations that can be put to use in personal and work settings.  Some of the highlights included K Wu’s session on ask vs. guess culture. I’d never heard these terms before. She did a great job describing both cultures and also giving tips for interacting with colleagues, managers, and direct reports who might come from the opposite culture as you. From there, we looked at leadership and conflict styles looking at the Hippocrates four temperaments as behavior preferences and different conflict styles and how we interact with our team as a collection of individuals who might have very similar or very different conflict styles. Examining our conflicts styles really made me think a lot about processes in tech and how some processes might give an advantage or disadvantage to folks with a specific conflict style.

One really interesting point was that over and over again, there was a clarification made in sessions to think about your responses, personality, and style in the context of how you are at WORK. This was interesting to me because women often are expected to act differently at work than in their personal lives and often many of us feel like we can’t bring our whole selves to work. I would be curious if men also feel this way and if there would have needed to be such an emphasis on “are we talking about our overall selves or our work selves in this scenario?”

There were a couple of interesting talks that had really tangible, actionable steps. For example, Annyce’s talk on creating videos and Neha’s talk on branding yourself were two of the best I’ve seen in those areas and really provided great, easy steps anyone could take and work towards in a thoughtful productive way.

There were also some tough sessions… one about self-care which really magnified the pressure many of us feel in the industry and put forth some coping solutions and some very real- talk about whistleblowing, being taken seriously in the industry, and how to give and receive advice.

There was a FASCINATING talk by Liz on algorithmic accountability and algorithm biases which taught me about how the ways in which a human develops an algorithm, especially a learning algorithm. can introduce biases. That’s definitely a topic I want to learn more about and found the examples incredibly interesting.

One major accomplishment for me was contributing to open source. I helped build a gem years ago to open source but have basically been scared of OSS ever since. I don’t have a ton of time and Ive heard some really scary stories about getting involved in projects. As part of write/speak/code though you actually get time to work on OSS. This is a big deal for me because I basically have no unspoken for time in my life. I looked over a bunch of projects and ended up working on the callback women rails app (a twitter handle that I rely on to find out about conferences and LOVE). It was a great experience and by the end of the day, I had a PR that was merged in. I’m hoping to keep up with the community and the project and contribute more in the future.

Finally, the last day was self-care day. It was great. There were really interesting talks about burnout, personal journeys, wellness, and salary negotiations. Overall, the conference was fantastic. You could tell the organizers put an incredible amount of thought and effort into the event. The speakers presenting thoughtful, intelligent, actionable presentations. The fellow participants were engaged, respectful, and kind. And, of course, the swag bag was awesome.


For a full least of speakers, the schedule and the slides, check out: https://2016.writespeakcode.com/pages/schedule

Monday, June 16, 2014

One Giant Post about Ruby Nation



This year again, I attended Ruby Nation. This year was great because I actually understood what was going on!! Admittedly, I took better notes on the second day than on the first because I was speaking on the first day but most of the session I went to were really great. Also, I apologize in advance because this is just one giant post, as opposed to breaking it up by session which I usually do after conferences.

The first session was talking about ruby and government with Sarah Allen. She was recently a presidential innovation fellow and spoke a bit about the interesting things she was doing and the really interesting digital data issues that the Smithsonian system has. Sarah brought up some really interesting thoughts about rails in general. One of the most interesting (controversial?) things she talked about was making Rails more accessible. She talked about other platforms like Drupal or Wordpress and the ease of adding certain functionality or widgets there. These are things that Rails doesn’t have. It isn’t super accessible because you don't have the same sort of ability to add widgets or different features. Her point was that potentially being able to make it easier to add widgets would make us more effective programmers and that by doing this, we wouldn’t have to re-work things or add simple, commonly-requested functionality on a regular basis.­­

Her talk closed with three interesting points to think about. First, framework leads to language. Second, what if we could add UI features at runtime, and what would that look like? And third, non-developers are co-creators so how to we give them a more active role in rails.

The second talk was by Eileen Uchitelle and was about CRUD and ActiveRecord. I thought this talk was fantastic, although admittedly got a little lost in the middle. The premise of this talk was that when we assume activerecord is magic and does all these magical things, we end up not paying enough attention to our code and to the actual SQL queries and how they’re functioning. Eileen then went through an example using each of the CRUD methods (create, read, update, delete) and went through ways that the queries could be better, faster, and more effective. For example, in create, she spoke about batch insert and in read she talked about using pluck. Her slides are super clear and definitely worth a read.

The third session was Terence Lee speaking about working with Ruby. He spoke a lot about how to commit and encouraged everyone to get involved with fixing ruby, committing, and getting involved with the core team. I learned that .to_f is to float. Floating objects “represent inexact real numbers.” He talked about the future of ruby being focused on trust, transparency, and onboarding.

The fourth talk was given by Davy Stevenson on Ruby as science, art and craft. I thought this talk was really great and looked at code from different perspectives and points of view. She started with science, looking at algorithms and talking about what complexity looks like. Davy went through a variety of big O notation types like linear, quadratic, exponential, and factorial. She described an algorithm as a set of instructions that will solve a particular problem… a great definition for someone who isn’t a math person. She then looked at the convex hull problem and demonstrated different approaches through different algorithms that connect the points and show this convex hull in different ways. I won’t go into them here, but if you want to google them a bit further, she discussed brute force, gift wrapping, and monotone chain algorithms.

Then Davy talked about art. The art part was lots of imaged of different interpretations of art and thinking about them. The best part of that segment for me was a quote she mentioned from @sferik where he said that programming is about building powerful things in simple pieces.

Finally, Davy discussed craft taking the idea of apprenticeship and artisan abilities and connecting it to code. She said we write code to enrich our own lives and the lives of the people around us and then showed us examples of beautiful code. Definitely take a look at the slides to see what people consider as beautiful code.

After this was lightning talks!! There were a few talks… one on muscle driven development, which talked about health and treadmill desks. One on debugging, another on language and thinking about how the language we’re using shapes how we look at solutions. A fourth on Ruby For Good which is going to be awesome and everyone shold check out. The fifth was on the Angelo gem and the last talk was about how you shouldn’t do ops as a dev.

From here, we went into the tracks. Again, the talks today, I won’t do justice because I wasn’t focusing as much as I could/should have been but at hopefully I can provide some notes. The first session I went to was JohnPaul Ashenfelter’s Machine Learning talk. He did this at RailsConf as well (a longer version). It was really interesting. Basically, he spoke about different gems and things developers could use to learn more about the users. First, he talked about the sex machine gem which isn’t perfect but can help determine the gender assignment of your user base. Second, he discussed free geoip to show location awareness. After that, he got into clustering a bit and looking at clusters in order to help determine patterns. He walked through the ai4r gem which puts people into clusters and then calculates the centroid (centroid being the center of the random clusters) and finally, it loops through to see if users are closer to the center or their cluster or another cluster. This enables you to see what cluster people are in which is super helpful is your clusters show, for example, what tier users are paying for in your system. Alternatives to this can be hierarchical clusterers or divisive hierarchical clusterers. Finally, he talked about a gem called linalg and how you can use it for collaboration purposes (I think… my notes get a little sketchy here).

After that, I went to an ActiveRecord workshop with Dave Bock. This workshop is fantastic, but very hands on so not many notes. Basically, Dave has a handful of scenarios that each table has to discuss and talk about how they’d architect them. Really helpful for continuing to learn about ActiveRecord, associations, and modeling.

The next talks I went to was about tests and having a messy test suite. Presented by Chris Sexton and Aaron Kromer, this talk was great. They went through testing best practices and showed examples of clean, clear test structures. Some highlights were that you shouldn’t deeply nest state in your tests and you can fix this by creating contexts, this way the state is top level and you can test everything. Tests should help organize and expose state. Class declarations should tell what behaviors to test. Finally, the two most important pieces of advice were to prioritize what’s most important to test and then iterate towards that goal and make your tests better as you work towards your goal.

The last talk of the day was about sidekiq. I don’t have a ton of notes from this talk as well but presented by Mike Subelsky, it was a great walkthrough of sidekiq and what you can tell from the dashboard when running it.

Day 2
I was able to pay more attention on day 2.

Day 2 started with Jim Gay talking about east-oriented code. This is a pretty cool concept that operates under the principle of tell, don’t ask. The core of it is that queries travel west and commands travel east. The talked touched on the law of Demeter and talked about east oriented code being different than that. There are four things to keep in mind with east oriented code. First, always return self. In this way the method is prevented from querying, can only tell. It leads to polymorphism, duck typing, and encapsulation. Second, factories are exempt form this. Third, always follow rule 1. And finally, sometimes break rule 3. After rule four, he showed a really interesting rails erb template that described this and walked through it. I left this talk sortof understanding everything but definitely would love to take a look at the code examples and slides in order to comprehend it all a little further.

The second talk I went to was on two programmers in one. I loved this talk by Jano Gonzalez. He talked about how each of us as developers are a little hacker and a little thinker. The hacker wants to get things done, and quickly which can sometimes lead to a maintenance nightmare. The thinker thinks about maintainability, abstractions and all the different layers but sometimes can get away from the problem that they’re trying to solve and can have analysis paralysis. He then told his story about going from hacker to thinker and coming to a good balance with both sides when using ruby. Jano spoke about how the hacker is useful for exploring new territory but the thinker is good from defining components and acceptance criteria. Developers need to deliver value but also diminish technical debt and it’s all about the balance between the two. My favorite part of the talk was when he spoke about the 3 stages of learning from Martial Arts. There is Shu, Ha, and Ri. Shu is when you’re new and you follow all the rules. Ha is when you move on and start adding your own knowledge and breaking some of the rules, and Ri is when there are no rules to follow and no rules to break, you just do it.

After that was a talk on google glass by Lance. This was a fun talk and one I just sat back and enjoyed since I’m not really developing with google glass but was just curious. Lance talked about apps as service layers. He then went on to discuss some of the glass specs, things that are great about glass and things that still need to be fixed. He then talked about the Mirror API, which I still have to check out, and how you don’t need to know android in order to program for glass. There’s a concept of static cards which add functionality and a new(?) tool called WearScript which is a bit like phonegap for glass.

Interesting talk and really fun to just see some of the programming side of glass.

Sam spoke about the anatomy of a mocked call which basically involved doing a deep dive into what a mocked call means technically with rspec, using their internal mocking library. He started by talking about testing and why you test/TDD. His main points were that TDD’ing helps programmers create a mental model. It helps them think through what the code does and then because things change as you program, it helps keep that mental model intact and keeps you on track with the problem you’re trying to solve. In short, tests force behavior.

The first part of this deep dive was discussing stubbing. Stubbing is basically faking a response to a method. Moching enables you to verify the collaborations between objects by testing the methods that get called. It creates a mocked expectation. so in the example
it “does something” do
allow(foo).to receive(bar)
expect(foo.bar).to eq (nil)
end


The allow is actually allow= allowanceTarget.new

allowanceTarget is a subclass of the TargetBase and calls delegate_to on TargetBase and, with a setup_allowance, TargetBase defines TO as an allowancetarget enabling .to to exist as a matcher.

Then there is receive which is also often used as a matcher. Once receive is set up as a matcher, similar to how to is set up as a matcher above, then receive#setup_allowance creates a mock proxy. A mock proxy is an object that manages the metadata of mocks and stubs on the object in the lifecyce of a test. Calling add_stub on this proxy sets up a emthod double which saves the original implementation. Then calling foo.bar (the stubbed implementation) sends a message to the method double which sends a message to the proxy which invokes the stub which returns a value (gosh, I hope I got that right!).

When you run a test, rspec also runs setup and teardown before and after the test and at the end of the test, the teardown resets everything. This reminds me a little bit of how testing work in ember with quint.

Okay, now onto mocks. For explaining mocking, sam worked through the same example but using expect(foo) instead or allow(foo). In this case, expect = ExpectationTarget.new and goes through a similar process as the stub did, except this time with a mock. Here, once you have the proxy, the proxy callbacks checks to make sure the arguments are valid and the proxy raises if a mock wasn’t called.

Finally, I can’t remember at what point sam mentioned this, but during his talk (or when someone asked a question about using spies instead of mocks), he mentioned spies so now I know what spies are! Spies are whenever you do a a stub, it will record the information so you can set an expectation at the end of your test instead of at the beginning. Basically, you can set a spy to collect all sorts of information from you and when the object returns you can ask it questions about it’s experience. The way I envision this is similar to what the Dorothy’s were trying to do in Twister. In Twister, the tornado chasers weren’t able to learn more about tornadoes because they weren’t able to see or understand what was happening inside the tornado. They came up with a way to release thousands of little sensors into the tornado to collect all the information and have them transmit the information back so it could be recorded and studying. From my understanding so far, this is similar to what spies do.

Evan is great. He’s got so much experience and his talk was on remote pair programming. Now, I work remotely, so I’m familiar with a lot of the tools, but his talk was less focused on tools like madeye, nitrous, and screen hero and more focused on command line tools. He spoke a lot about vim and emacs (which made me really want to learn vim again… one day I’ll get around to that). He also spoke about tmux, ssh’ing into machines, and a lot of really interesting concepts. He spoke about how his remote pairing stack has changed over the years and different combinations of things he’s tried which allows people to pick any of these tools and configure it to their remote pairing liking. Overall, an interesting talk and some exposure to remote tools I hadn’t thought about in the past.

Mark spoke about wyriki which is a project that Jim Weirich was working on when he passed away. I’m gonna be honest and say that Mark lost me pretty early in his explanation but this is what I got. Wyriki is a different way to architect rails applications. It creates new structures of runners in between controllers and models which allow someone to isolate the business logic from everything else. The rest of my notes on this are sparse and it’s pretty obvious I got lost in there, but I think the core takeaway was thinking about different ways to structure apps, so not fat model, skinny controller and not everything in moderation but how to really separates different types of business logic in your apps.

Next up was Justin’s talk on breaking up with your test suite. I took frantic notes on this one and listened intently, but eve so I’m sure I missed stuff. Also, these slides were great and super understandable so check them out. So first was talking about why we should test. there were 8 or 9 ultimate reasons why code should be tested which fall into two essential categories. First, you can gain confidence from the test and you can gain understanding of the code through the tests. BUT he started by discussing that we should question before we test. When thinking about tests, we should think about the purpose, rules, and structure and we should expect that within our test suite these three items should be immediately clear to anyone looking at it. If we cram lots of different goals and motivations into each test, the test becomes unclear. The rules become debatable, the purpose becomes hazy, and the structure ends up being ad hoc instead of uniform. Every test suite should promote one type of confidence and 1 type of understanding. So, here are some different suites and for each suite Justin went through the user, what the understanding and confidence were, tips, and warning signs.

First up was the safety suite. The safety suite is for the browser It checks does the app work and is our product simple. If the tests do not fit inside 30 minute or if you can’t write a new test within 30 minutes then your product probably isn’t simple. These tests shouldn’t see the internal apis. They should bind to what is visible by the user and they should enforce a fixed time-budget. The warnings here are that failure from refactors are often false negatives here and that human intuition overvalues realistic tests. On this type of test suite, numerous releases and branches can get expensive and there is the idea of the superlinear slowdown meaning that the bigger the system, the slower the tests.

Next comes consumption tests You should verify behavior and demonstrate usage with these types of tests. The user is the repo’s customer and they are used to verify what you, as the programmer, is directly responsible for. It says, is this code usable? If it’s hard to test, it’s probably hard to use. For these the module boundaries should be meaningful beyond testing (ie- these things talk to each other so they should be tested together). It should fake all the dependencies. It should exercise the public, not private apis. And finally, it should be organized by the consumer’s goals and outcomes. Warnings-wise, these tests need to be fast and this is the only part of the suite that tells you “you just broke something”.

The next tests suite are contract tests. Contract tests are used by us. They represent our interests that live in someone else’s repo. It leads to faster feedback making sure that something in the system that someone else is working on, doesn’t break something you’re working on. For these, they should be written for first party dependencies and follow the same rules as consumption tests. These are NOT a replacement for actually going and talking to your fellow dev about what they’re working on.

Next is TDD. So, so far, in all these tests suites, none have talked at all about the design of the code. The main value in TDD-ing is to discover tiny, consistent bit that help with big projects. The user is someone concerned with implementation details and the inputs and outcomes. These tests are a sounding board and enable you to have confidence in building small things and learning about what roles our code is playing. Here, he showed a cool chart that had interesting structural points related to putting queries on the left, logic in the middle and commands on the right… reminded me a bit of east-oriented code structures. He also stated that commands and queries should have very little logic. The warning here is that discovery tests yield small disposable units so be okay with throwing stuff away.

Next are adapter tests (whoever knew there could be so many different kinds of tests suites!) These tests exercise the adapter API under just realistic enough circumstances. It warns us of outages or API changes. These tests also reduce the cost of swapping dependencies later. For these, don’t test them first and trust the framework. These are similar to contrat tests but contract tests improve communication between colleagues whereas these tests improve the feedback between your code and the 3rd party code. Last warnings are that these tests can be slow and outside of your control and that they can be tricky if you’re using some sort of CI.

Phew! that was that talk.

One note is that my confusion still lies a bit in integrating all of these different types of tests. Should an apps test suite have all of these things? What does it look like structurally? Are they in the same files or different files? But I think the idea of thinking about all of these different suites and the goals of tests and testing is pretty cool.

Production code analysis by Dan was a great talk. Dan talked about code cleanup and how to look at a monorail (single large application) and refactor/delete effectively. You want to look at what code is being run to allow for good code cleanup and that lots of these monorails have dead code. Some overarching tips are to celebrate clean up commits as a team and to start by finding large unused code sections by finding unused actions. There are a handful of tools he talked about to help find this dead code. First you can use new relic which can show you for any given endpoint, how often is it being hit and then you can do a route check to see what routes are completely unused. You can also use tools like graphte, statsD and redis to find unused actions. For example, statsD is pretty easy to implement, has lots of info from Etsy’s blog, and can be used to see both timing and emdpoint information. You can look at background jobs in redis to see which jobs aren’t being triggered at all and what events are related to those jobs.

For mailer, you can see which is the most popular and least popular mailers by hooking statsD into active mailer. Finally, if you find the actions not being triggered, you can often delete the related views that aren’t being rendered any more.

Another good place to look is at translations. Which translations are in memory but aren’t being used anymore? Use the gem humperdink to track these translations. Finally, you may have two methods that are doing the same thing in your code. For this, learn which is best by wrapping the methods in a split. Wrapping them in a split and tracking them with statsD will tell you which method is faster or more effective and allow you to make data-driven decisions.

Lastly, Dan talked about logs. Logs are great for cleaning up code. Logs should be searchable and in one place. You should try to standardize the log format and multiple apps that communicate should be in the same system. Once you’ve got good logs, you can do log queries or check out endpoints to see what’s arriving to them. For this, check out the gem imprint.

Russ Olsen spoke about going to the moon! Wait for this talk to come out on video. I had to leave about 15 minutes early which was a bummer but he’s such a good storyteller, I was on the edge of my seat the whole time.

Saturday, June 14, 2014

Interesting Reads 6/7/14 - 6/13/2014

Busy busy busy this week but I was still able to read a few interesting things. Even though I'm not using Ember on a daily basis anymore, it's still an interesting framework to me so there's an ember post, a little bit of debugging, and then two good soft skills posts. Finally, I haven't had time to finish watching all the railsconf talks I want to but I'm not sure when that will happen so i'll post the talks that are still on my list below.

Enjoy!


Learn to code, learn to think: http://www.npr.org/blogs/13.7/2014/06/09/320309576/learn-to-code-learn-to-think

Feeling like a fraud? Everyone does! https://medium.com/theli-st-medium/everyone-feels-like-a-fraud-530cfc9c774d

Debugging in Rails. A great collection of tools to use and posts on how to use them.

Terminology and what it means in rails vs. ember. This was a great post but I think the most confusing piece for me when learning was the use of the term routes and what that means in rails vs. ember so i'm a little disappointed that they didn't include it.

RailsConf talks I haven't quite gotten to:

The Rails of Javascript won't be a framework


All the small things

Aaron Patterson's closing keynote

Lightning fast deployment of your rails-backed Javascript app

DHH's Keynote

Wednesday, June 4, 2014

Haml anyone?

I announced to the social-media-verse earlier last week that I was starting as an engineer at General Assemb.ly! I’m really excited to be a part of their team and it looks like I’m going to be working on some really interesting projects and products in online education, among other things.

One of the first things I did this week was learn some haml. Haml is a markup language that allows someone to “cleanly and simply describe the html of any web document”. Basically haml is cool because it lets you do the same thing you’d do with html or html.erb files but with much less code.

For example, you don’t have to close tags! So instead of writing
<h1>This is great</h1>
all you do instead is %h1 Amazing!!

I was really curious then as to how this affects being able to dictate classes and ids for the scss I’ve gotta put in. Well, reading through that was when I decided to write this post because it’s so clean and simple. You use the same symbols you would in the css doc but in the haml doc. For example, %div#awesome is equal to

<div id="’awesome’">
</div>
<code>. For classes, it’s similar to %div.more.amazing.stuff is like typing <code> </code></code>
<div amazing="" class="’more" stuff="">
</div>
.
The only annoying part (so far) is that you have to be careful about your spaces/spacing so it will error if you don't have the right number of spaces as you nest.

There’s lots more and the docs are surprisingly good so check out the resources here: http://haml.info/docs/yardoc/file.REFERENCE.html

And here: http://haml.info/

Sunday, May 25, 2014

Interesting Reads 5/17 - 5/23

Lots of really great links this week. There are a few more RailsConf talks since I had a chance to watch a few more of those this week. Some great posts on terminal and keyboard shortcuts and tricks, and some fun team-related posts.

Enjoy!


Amazing tips and tricks in this post for keyboard shortcuts.

AND amazing tips for terminal in this one.

Leading a team is really hard. Jessie does a great job talking about some of the ways to actually be a GOOD manager.

Some great tools and thoughts for thinking from railsconf.

Love this! https://speakerdeck.com/aviflombaum/20-things-i-love-about-code

A really interesting talk about imposter syndrome

I've always looked at the stages of group development in the context of leadership groups and immersion experiences but this is an interesting post on the high performing team dynamic in programming

Does the size of a team affect the quality? This post talks about some of the data behind it.

Saturday, May 10, 2014

Interesting Reads 5/3 - 5/9

Here are some really great reads from this past week. Lots of good fodder for self-reflection and thinking critically about programming and life, in general

Enjoy!


The hardest parts of software development

An interesting post about being more interesting… not sure I agree with all the entire post but interesting to think about.

Love Love Love this!!: http://blog.samstokes.co.uk/blog/2014/05/01/what-programming-is-like/

The importance of looking up and recognizing what's around you.