Contract Work

Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

Tuesday, April 5, 2016

Parenting and Developing

A few months ago, I was learning how to balance being a new-ish software developer and a new mom. I reached out to a few mothers in the community and was amazed at what I heard. Every mom talked about facing similar challenges which got me thinking... do all parents feel this way? Are we all feeling isolated about the same issues?

As a result, I put together a survey and tweeted it out to parents (mothers and fathers) who are also developers. The results have been fascinating and very telling of issues and trends in this area.

The great people at Ruby on Ales allowed me to speak about the survey and it's findings this past weekend (video will be posted once it's available).

As I mentioned in the talk, this research will be ongoing. The more data I can collect, the better! If you are a developer and a parent, or know someone who is, Please fill out this survey if you have a chance. It's super short and we're all busy parents so don't worry about complete sentences or well-thought out responses... just a simple stream of consciousness is more than okay with me!

Thank you in advance!!! And ping me if you've got any questions.

Sunday, March 30, 2014

Ember for Children

I thought it was nice that this session was included in the first ever Emberconf. With so much information to cover and so many interesting components of the technology, it was nice that the organizers made sure there was a talk that focused on the community and what we can be doing together for underserved communities in technology. Highlighting an achievement like this, really shows that even though we’re cranking out amazing technology, building the community is important and giving back is core to that idea.

DeVaris Brown (who also does ember hot seat) talked about a new initiative he’s launched which takes at risk youth and teaches them about programming and code. He started by talking about the bootcamp idea (something I have mixed feelings about and have written on before) and wanted to provide a bootcamp-type opportunity to high school students that wouldn’t be able to afford something like that. He walked us through the curriculum he used to teach these students, the time he put in, and where the students were today. He worked with Black Girls Code and other organizations to find students. He also spoke honestly about the challenges he faced like reasons students couldn't come to class or the basic typing skills necessary (for which he recommended typing.io).

DeVaris received a standing ovation and got a lot of questions from people on how they can help and get involved. I think it’s great that the community is so interested in providing these opportunities and focusing on these sorts of initiatives. I hope that they can work together and some of the already established organizations to make more things like this happen instead of trying to reinvent a new initiative.

Saturday, March 29, 2014

Contributing to Ember

The next session was on Contributing to Ember. This is going to be a pretty short write up because a lot of the talk just went of the technical structure of how to contribute.

The three types of contributions are primarily fixing/cleaning up the docs, reporting and/or fixing bus, and submitting new features.

First step is to pick the right repo. If you’re looking at the docs, there is a guides repo and a main repo. For each of the types of contributions, there is a naming convention that goes along with the commit and you want to make sure to use the right prefix for what you’re committing. Because I’m mostly interesting in looking at the docs, I took the most notes around there. There are three kinds of commit prefixes [DOC], [DOC beta], and [DOC release]. For bug fixes, when submitting something you want to make sure to add a test that shows regression. If you can show a test, then you definitely need to show instructions and do a jsbin with specific information. The main point emphasized here was to make it as easy as possible for others to see the bug you are talking about… especially if you are submitting a bug report but not necessarily fixing the bug.

Another important emphasis was on security. Mainly, DO NOT report security issues on github. For those, email the security team privately.

For submitting features, all features are behind feature flags. In features, you want to look at the JSON to see if the feature is enabled or not. There are specific feature commit message instructions with specific message types and you want to make sure to hide changed behind flags.

Finally, they talked about the release cycle, which was interesting. There are basically three channels and six-week cycles. The three channels are beta, canary, and release. Beta is branched from canary and includes bug fixes, doc updates, and goes on a weekly release cycle. Canary is everything, new features, bug fixes, etc. Release is also branched from beta and it’s doc updates, major regressions, and security fixes.

I have to admit, I was a little intimidated at the end of this talk. I really want to contribute to open source, especially to something like the ember docs where I feel I could maybe help pinpoint confusing points or rephrase to make things more understandable, but walking through this process made me pretty nervous about screwing up the prefix or process.

Monday, January 20, 2014

Contributing to OSS

So, if I haven’t said it enough, getting involved in the community is crazy important. I’ve recently been looking for a job. The process has actually been more difficult than I anticipated. A lot of people will tell you it’s incredibly easy to get a job in this field. I’d say that while there are positions available in the field, it is still challenging to convince a company, especially as a newer developer, that you are worth it and that you’ll totally blow them away… if they just give you the chance. Additionally, I want to make sure that where I end up is the right fit. I feel fortunate to have years of professional experience that have allowed me to really know myself as a professional and give me a better ability to determine if a company is a good fit for me or not.

While looking for a permanent position, i’ve been looking for great, challenging projects that continue to expand my skillset and make sure I’m learning as much as possible while I have the time. A few weeks ago, I was approached by a friend at a meetup who had a little too much on his plate and felt he had some work that would provide me with some good experience. Because he’s a friend, he knows my level and therefore I’m very comfortable asking questions. He also thought this project would be a good one because he could provide support, the gem needed to be built but isn’t super crazy complex, and he felt it could provide me with a good opportunity to contribute to OSS… something that is on my goals for this time period and definitely something I’ve been looking to do. Conversely, as a solo freelancer, he hasn’t had the opportunity to often pair or to take part in code reviews, a skill he wants to develop. We saw this as a win-win situation and there I was... working on a ruby gem. The gem posts are a little post-dated because I wrote them as I was working on the gem but didn't have a chance to post everything!!! So, I'll try to get these posts up quickly.

The gem has some simple functionality. It is essentially a way to work with a company’s API and download additional information about email blast campaigns beyond what they currently provide. The gem involves writing tests, utilizing an http client, and working with the API.

I have to admit that a large portion of me is/was terrified. I’m building something new. I’m actually getting paid to do it. AND it’s then going on the interwebs… as a gem… and a part of OSS… for other people to use!!! But fortunately, I’m not terrified enough to shy away from the opportunity.

Geoff had gotten me started by giving me access to a private repo, creating the gem structure, and providing a few details and resources he had thought through in regards to the gem. I started by creating the spec file and thinking through what this gem would do in order to write some tests that could be used essentially as an outline. I put all these tests as pending, but I was able to scope out the major functionalities by thinking about what the output would be and what we would need to make sure is working.

I then started on the actual code. I started by taking the tests and looking at what classes those would create. Classes should each have a single responsibility so I looked at each action that needed to happen and thought about a class structure based on that. My intention is to write the code all in the same file and then do some refactoring to break it up. The next step was looking at the http clients. There is an authentication component to this gem and once the authentication happens, a cookie is received and that cookie needs to be stored in order for it to be used in future actions.

Monday, December 16, 2013

Look what my Bot can do!

It’s amazing what a little chatbot can accomplish. It can make your day much brighter and more fun!! So, let’s talk about what Rosie can do, because it’s a lot.

So, first, Rosie can do some of the standard things like reply with gifs about coffee, District Taco, and lol’s. She also responds when you say good morning so that everyone every morning gets a fun response. She reacts to you when you say you love or hate coding, and she’s all about refactoring.

Those commands are accomplished via regular expressions. Regular expressions are a concise, flexible way to pick out specific words, phrases, characters, etc. Regular expressions look really terrifying when you first encounter then, but are actually really handy and not so scary once you get a handle on them. Based on Nell’s talk/suggestion at RubyConf, I made a permalink for each regex and put it as a comment in my code so I can always go back to it later. I used rubular when crafting the regex’s which made them a breeze. (Okay, not a breeze at first, but made it much easier to learn and figure out what each character did and how it altered what I was trying to do).

The next set up functions are random things that Rosie will say periodically.
on :message do |m|
  if rand(500) == 0
    m.reply "SQUIRREL!"
  end
end
This basically say that for each message sent, the script will see if that number matches 0 and if it does, then the bot will reply with “SQUIRREL!”. There’s another one of these built in there as well, but people will have to wait to see what that is.

Finally, there are some responses where rosie can choose to respond as a reply or as an action.
These options look like this:
on :message, /#{config.nick}\?/i do |m| 
  response = [
    [:reply, "Did someone ask for me?"],
    [:reply,    "http://31.media.tumblr.com/fe021d747a605a8a7cba5767011251e1/tumblr_mjpo4q44aj1rjatglo1_500.gif"],
    [:reply, "what do you want now?"],
    [:reply, "#{m.user.nick}, why are you bothering me?"],
    [:reply, "it wasn't me."],
    [:reply, "yyyyeessss?"],
    [:action, "hides"],
  ]
  msg = response.sample    
  if msg.first == :action   
    m.channel.action msg.last 
  else
    m.reply msg.last  
  end
end
So, each line…
The first line says that on the message whatever the configured nickname of the bot is (meaning that I can change Rosie’s name and the regex will still work) followed by the “?” then (next line) Rosie will reply with one of the options in the array. The next few lines show the options that Rosie can reply with and whether they are a reply or an action. A reply would look like this:
Rosie: It wasn’t me
While an action would look like this:
*Rosie hides
Then, msg = response.sample says picks a random value from the message array. (Next line) if the first element in that array is an action (:action), then (next line) add /me to it when it replies in the channel. Otherwise, reply like normal.

The next post will talk about functionality that incorporates some more complicated methods and a database!

Monday, December 9, 2013

Building a Bot

I recently mentioned in my mentorship goals that one of the things I wanted to quickly dive into were databases. There are a variety of database types and ways to work with them. I was able to get an introductory handle by looking over Learn SQL the Hard Way and doing some additional research but databases are difficult to understand until you really start doing work with them.

At the same time, the bot in an IRC channel I often use was acting up. Basically, the bot was/is pretty much broken and needs to be restarted but no one knows who is actually able to restart the bot. Chris and I decided that a great first project for us to work on via the mentorship program would be to build a bot and to add a database component to it.

So first, what is a bot? A bot is a program that you can connect into a chat room (in this case an IRC channel) which will then respond to different conversations or things happening in the chat room. Most workplaces I’ve spoke to that utilize hipchat, campfire, or other internal chat communication tools have some sort of bot that hangs out in the room as well and makes it more entertaining. It’ll pop up funny gifs or respond to things people say. It can also be useful by providing information about testing or alert the room when someone deploys code.

My bot’s name is Rosie. She’s awesome. I’ll write up a few posts in the future that describe more about what she does but for now, I just want to go over the setup. First, I used cinch. Cinch is a great, easy way to set up a bot and gives pretty straightforward instructions that get you moving quickly.

This is what the setup code looks like.

bot = Cinch::Bot.new do 
  configure do |c| 
    c.server = 'irc.freenode.net' 
    c.realname = 'Rosie' 
    
      c.channels = ['#rosie'] 
      c.user = 'rosie_' 
      c.nick = c.user 
  end

Now, to walk through each line.
The first line bot = Cinch::Bot.new do creates a new bot using cinch. This new method takes a block.
In the next line configure do |c| , we are in the block configuring the method. This method also takes a block and passes in the cinch configuration for the bot which means it passes in a reference to itself that you can configure.
The third line c.server = 'irc.freenode.net' shows the server we are connecting to.
Then c.realname = 'Rosie' is the real name that will show up when someone asks who is in the IRC channel.
Next, c.channels = ['#rosie'] is the channel that the bot connects to. Right now I’m just testing her out, so I have her connecting to an independent channel that no one is using.
Coming to the end, the 2nd to last line c.user = 'rosie_' gives the nick name of the bot that will show up in the channel.
And finally, c.nick = c.user sets the nickname to the same thing as the username.

So, there’s the initial setup. I’ll do future posts on both functionality and integration of a database, as well as one on what is IRC in general for those not familiar with it.