Home Blog Page 25

Following Your Passion – Good or Bad Advice?


On Wednesday’s I like to cover a random topic that applies to developers and today I’m going to discuss the idea of following your passion. I hear this term and this advice quite often and I’m not a fan of taking things at face value, so I wanted to look into the concept and review it here.

At a high level the advice centers around the idea that if you do work in a field that you truly love, that you will be happy. Many people point to Steve Job’s Stanford commencement speech when he says

“And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become.”

Following Your Passion – A Case Study

In researching this I came across Cal Newport’s book “So Good They Can’t Ignore You”, where he took a deep look at Steve Job’s life and shows that if Jobs would have spent his life adhering to the advise of “following your passion” he never would have started Apple, instead he would have become a Buddhist monk living in Asia. Jobs started Apple for the practical reason that he saw a way to make some quick money selling a set of computers to a local electronics store and that sale sparked his interest in technology.

So it seems like following your passions is not a cut and dry process of doing work that you love. However my advice is not to ignore your passions, but instead to use them in order to build a career that you truly love and can excel in. Sticking with the Steve Jobs example, one of the other passions Jobs had was calligraphy, which is essentially fancy handwriting if you’ve never seen it before. When creating the user interface for Apple’s operating system, Jobs leveraged his extensive expertise in calligraphy to integrate fonts into the programs. Here was an example of Jobs combining his passions with a practical implementation.

As developers we’re in a unique position where we can work in a wide assortment of industries, if you love sports you can work for a professional sports team or if entertainment is your flavor you can work for a media company, the possibilities are really endless. One of my biggest passions is baseball, I grew up around the game and I love everything about it. I wasn’t skilled enough to play professionally, however right now I’m working towards my PhD in computer science and my topic of research is big data analysis in baseball. It wouldn’t have been practical for me to waste who knows how many years trying to make it as a professional baseball player, however I can leverage my skill as a developer and still perform work that I love to do. I’ve also have the privilege of having multiple clients that are in the sports industry, which has allowed me to work in the sector that I’m passionate about while still leveraging the skills I have as a developer.

Hopefully my research and personal experiences can help you decide on whether or not following your passion is the right decision or if there is a middle group that would lead to a better end result.

following your passion

Answering Impossible Interview Questions


Happy Tuesday everyone, on Tuesdays I cover various interview topics and today I’m going to discuss the best ways for answering impossible interview questions. How would you like to be asked the question:

“How long would it take to sort 1 trillion numbers?” or “How many planes are there in the sky at a given moment?”

If that doesn’t sound like your idea of fun you’re not alone and many organizations have stopped asking impossible or seemingly impossible questions, however there are still interviewers who like to ask them so I thought it would be helpful to discuss. First and foremost, if you get asked one of these questions, the interviewer’s top goal is not seeing if you know the answer or not, instead they are looking to observe your problem solving skills. Typically the best approach is to take a systematic strategy so you can show that you have an organized thought process.

Answering Impossible Interview Questions – Case Studies

Let’s take the first question as an example: “How long would it take to sort 1 trillion numbers?” That seems like a challenging task until you establish a base case, such as: “How long would it take to sort 10 numbers?” If you know your algorithms you would most likely choose to use a sorting algorithm, such as Quicksort, since it has an average sorting time of O(n lg n), which would be O(100 lg 100) after swapping out n for the total number of integers. So it’s actually trivial to sort 1 trillion integers, since it would be O(1,000,000,000,000 lg 1,000,000,000,000).

In this question the interviewer is first wanting to ensure that you know popular algorithms and that you have a clear understanding on which algorithm would be the right fit for the task.

For “How many planes are there in the sky at a given moment?” this is a guesstimate question and the actual answer doesn’t matter at all, instead the interviewer wants to see how you walk through an analytical problem and also how detailed oriented you are. For this I would start by asking the interviewer filtering questions, such as: All the planes in the world or only in the US? Does this only include commercial planes or private jets and military aircraft? And questions that show that you know how to properly think through each of the parameters you would need to know to properly answer the question. From there break down the problem into subproblems, say the interviewer says that they only want the list of commercial planes in the air in the US, you can start to create an estimate on how many flights leave an airport each hour, set an average duration of the flights, etc. From there you can multiply that base case by the estimated number of airports in the US and you will have your guesstimate, and more importantly you will show the interviewer that you have thought through the problem.

I hope that this guide has helped give you a strategy on answering impossible interview questions and good luck with the job hunt!

answering impossible interview questions

FTP Tutorial – Understanding the File Transfer Protocol


On Monday’s I like to cover a complex development topic and give a dead simple explanation on how it works and today I’m going to walk through a FTP tutorial, focusing on: what FTP is, how it can be used, and lastly give a walk through on how to use it for a real world application.

So what is FTP? It stands for File Transfer Protocol, and essentially it’s a networking mechanism that allows for files to be transferred from one system to another. For example, if you have build an HTML website and you want users to be able to access it from the Internet you can use FTP in order to push your files to a remove server from your local computer. You’re also able to use FTP to transfer any type of file, there have been many times where I’ve utilized FTP to share large files between myself and someone else working remotely.

Services such as Dropbox and Google Drive have decreased FTP usage for file sharing, however it can still be helpful if you’re working in an organization that blocks third party file sharing services. FTP is great for simple website deployments and sharing public information, however if the files being transferred need to be protected it’s recommended that you utilize FTP’s prettier cousin, SFTP, which stands for SSH File Transfer Protocol. FTP simply creates a connection with another server and shares the file, however during transit the files could be hijacked, so it would be a poor choice for sharing sensitive information.

SFTP follows a similar process, except that it encrypts the connection, making it much more secure and a better option if you’re transferring files that need to be protected. Now that you know what FTP is, how can you use it? Typically you’ll want to use an FTP client, some popular ones are: FileZilla and CyberDuck, they’re free and they will work great if you simply need to transfer files. I usually use Coda, since it let’s me transfer files and also comes with a pretty slick text editor.

The steps for using FTP or SFTP is the same using these types of tools, and the steps are as follows.

FTP Tutorial

  1. Select the protocol, either FTP or SFTP.
  2. Enter in the server URL, you can get this from your hosting company, it’s usually ‘ftp.yourdomain.com’.
  3. Select the port, if you’re using SFTP the default port is 22.
  4. Enter in your FTP username, if you don’t know this you can also get it from your hosting provider.
  5. Lastly, enter your FTP password. Assuming that you have entered in all of the correct information you will be logged into the server and then you can simply start dragging and dropping files.

Here is what it looks like when I log into the CronDose.com website, the window on the left hand side are all my local files, and the pane on the right is the server and to transfer files I can simply drag and drop them between the windows.

coda guide

Depending on the FTP client that you use the user experience will be slightly different, but the concept will be the same. I hope that this has been a helpful FTP tutorial and will help you work with it for your development projects, in the show notes I’ve also included some links to other resources that can help you further understand how FTP works.

ftp tutorial

FTP Resources

Managing Client Conflicts as a Freelancer


You’ve made through another week, and today is Freelancer Friday, where I discuss various strategies for managing a freelancing business, and today I’m going to discuss managing client conflicts.

It’s simply a matter of life and business that you will run into conflicts with clients, some of the most common confrontations seem to be:

  • Going over the time you originally estimated
  • Going over the budget for the project
  • Not delivering a feature that matched the client’s expectations
  • A bug occurring in an application

None of these are fun to work through, and most of them can be avoided if the proper care is taken at each stage of the project management process. However I want to discuss what happens when conflicts occur and how to best manage them.

Strategies for Managing Client Conflicts

First and foremost, do not let emotions take over. This is probably one of the hardest ones for me because I love what I do and when bad things happen in a project my first response is to get defensive, which is one of the worst responses to have. So when I see an angry message come through from a client or take a phone call I make sure that before I respond I sit back and try to look at the situation from the client’s perspective.

It’s pretty rare that a client will get upset for no reason, the majority of people are rationale and they prefer to stay away from confrontation, so if the client is mad there is probably a legitimate reason for it. Therefore the first step I take is pretending that I’m the client and then I feel like I can give a better response from that perspective. If a project went over budget and I’m imagining that I’m the client, I can understand why they’re not happy – because I don’t like spending more money on something than I originally was told it would cost.

So instead of responding with a defensive messages, such as:

“It wasn’t my fault, you were the ones that changed the scope”
“I can’t control that the fact that the designer took twice as long to deliver the mocks”

I’ll start with saying things that show that I understand their perspective, for example I’ll say:

“I completely understand how frustrating it is, the project scope has grown and it’s been hard to meet all of the requirements based on the original timeline”
“I am sorry, I should have allotted more time for the design phase, it’s my fault and I will work to get it taken care of”

If you pretend that you’re a client hearing those four responses, which ones would put you more at ease? The ones where I was defensive and tried to blame everyone else or the ones where I took responsibility for the project and gave a calm reply back?

The easy thing to do in a confrontation is to become defensive or respond back aggressively, however neither of those approaches will fix the issue and they’ll most likely make things worse. Your first goal when a conflict arises between yourself and a client should be to see if you can see the issue from their perspective.

With all of that being said, there will be times where the core problem is the client’s fault. They may be very bad at stating project requirements or they may simply be poor communicators. I once had a client who hired me a few years ago and asked me to build an application and they simply gave me about 4-5 screenshots from another website and then they completely disappeared. I did my best to build what I guessed they wanted and I sent daily updates to them, and then a month later he messaged me furious that the app wasn’t what he wanted and then went on to list all of the features it was missing, even though they were features he had never asked for originally. I calmly fired him as a client on a spot and informed him that I wouldn’t be able to work on the project any longer. I didn’t raise my voice, I didn’t explain how he gave me little to no guidance for building the app, but I knew it wasn’t the type of client I could work effectively for.

I hope that this has been a good set of tips for how to manage conflict with your clients. I did quite a bit of research on this post prior to publishing it to see if there were any things that I was missing and I discovered a full library could be made out of the information based on conflict resolution. There are discussions about personality types and more acronyms than I care to list out here, however what’s I’ve published here is what I’ve used throughout the years and it’s worked very well for me through a number of challenging situations and many different client personality types and I’m confident it will work well for you and your clients.

managing client conflicts

Rails 5 on Heroku Focuses on New Version Strengths


On Thursdays I like to cover a topic in the tech news sector, and specifically discuss how it relates to the development community, and so today I wanted to talk about getting Rails 5 on Heroku.

Throughout the past few years Heroku has grown to be one of the most popular deployment engines for Rails applications, I’ve personally used it in the majority of the courses I’ve taught because it’s a great offering for quickly getting a Rails app live on the web. However, with the ease of Heroku also came a number of limitations and typically I find myself having to migrate applications to other hosting providers such as Digital Ocean or Linode as soon as an app reached even a hint of popularity.

For the most part the Rails community seems to treat Heroku like a great prototyping tool, but not the best option when it comes to production application hosting. Well, based on the announcement this month from Heroku it looks like they’re trying to expand their offering in a number of ways.

I’ll put a link to the announcement to the show notes, however here is a summary of the features:

  • For Rails 5 on Heroku they’ve switched to using the Puma web server by default as opposed to the poor performing WEBrick server. This has always been possible, however with the integration of ActionCable in Rails 5 WEBrick is no longer a viable option, even in development. They also do some nice things such as matching your server thread count with the ActiveRecord thread count to prevent errors in production.
  • If you’re using Rails 4.2 or above Heroku will serve your static asset files, before that you would’ve needed to use the rails_12_factor gem, which is a nice convenience.
  • They’ve also integrated some refinements to working with logs, you’ll still want to use an outside add on such as Papertrail or Logentries, however the log files should now be easier to read.
  • You’ll be able to have a little more protection against destructive actions on your production databases. If you attempt to drop a database it will give you an explicit warning as opposed to simply performing the action. Hopefully you’re not in the habit of running rake db:drop on a normal basis, but now at least you’ll have an extra layer of protection.
  • There’s now better support for the SECRET_KEY_BASE config variable to help protect against developers checking their app’s secret key into source control.

Some of these items were developed in Rails 5 and Heroku is simply giving you an interface to access them, however it’s good to know what some of the key differences are.

Rails 5 on Heroku Announcement

rails 5 on heroku

Task Switching Costs for Developers


On Wednesdays I like to cover a random topic for developers and today I’m going to discuss the concept of task switching costs. Task switching, commonly referred to as multitasking, can be detrimental to your performance as a developer and can even lead to errors in your projects.

Our world has changed dramatically over the past decade, whether for good or bad is not a topic we’ll discuss today, however one thing is sure: we are constantly bombarded with distractions. As I was researching this post I received over a dozen emails, 7 Snapchat messages, 30 notifications on Instagram, 7 Twitter notifications, 5 Skype instant messages, and surprisingly only 9 text messages. If you were counting that’s around 72 various notifications that were pushed to me in the past two hours. Beyond that, I researched this post at a coffee shop filled with potential distractions.

So exactly how bad are distractions? Research from Gloria Mark, who is a Professor in the Department of Informatics at the UC Irvine shows that it takes, on average, 23 minutes and 15 seconds to get fully back on task after being distracted. That’s a very very bad thing when it comes to productivity, however I’ve seen it myself, I’ve lost track of how many times I’ll be in the middle of a development project and receive an email on a completed unrelated matter and instead of ignoring it and continuing to work I’ll read it and then spend time working on another task before returning to the project. This may not sound like a major issue, except that when I come back to the project I don’t pickup from where I left off. Instead I have to re-familiarize myself with what I was working on the moment that I was distracted. If the problem was complex it may take me even longer than the 23 minutes in order to get back in the zone and working on the project.

So in a world filled with emails and social media distractions how can anyone get any real work done? After reading Cal Newport’s book “Deep Work” I started to put together some practical ways that I can work efficiently and still stay in touch with the world.

System for Decreasing Task Switching Costs

  1. If I’m working on a project I set aside a specific amount of time that morning. For example, if I’m working on Project X for 2 hours, I will put it on my calendar and say that from 9-11am I’m working on Project X.
  2. I remove any and all negative distractions during that time. That means I’ll usually put my phone on Airplane mode so I don’t receive any social media notifications. Notice how I said ‘negative’ distractions? I made this distinction because in the same research report from UC Irvine it revealed that not all distractions are bad. If the distraction is related to the task that you’re working on, it can actually be beneficial. For example, if I’m working on the routing engine for a web application and the client messages me to discuss the application, what they say may actually influence the work that I’m doing or give me an idea on how to refine it. That’s a good distraction and it’s why I typically will keep my email and instant messenger on while I’m working. However if I see that the Skype message or email is coming from another client or is completely unrelated I’ll simply ignore it. I do know many Deep Work proponents who would say that 100% of your distractions have to be eliminated, however that’s not always practical.
  3. Have a clear conclusion for whatever you are studying or working on. If you don’t establish an end for the task, your mind is going to be prone to wander in the same way that a runner without a finish line won’t be able to effectively compete in a race. The research around task switching costs also reveals that even planned distractions are harmful, so if you are planning on working for 2 hours straight on a project don’t plan any breaks in the middle of the task. Maintain your focus throughout the allotted time and then you’ll be free to relax afterwards.

I hope that this has been a helpful overview of task switching costs and that you now have some practical methods for staying on task.

task switching costs

Developer Salary Negotiation Strategies


On Tuesday’s I discuss various strategies for preparing for a development interview job, and today I’m going to cover the topic of developer salary negotiation strategies.

Talking about money is a sensitive subject for many individuals and when it comes to negotiating how much you’ll be paid it also comes with the added stress of knowing that if you ask for too much you may not get the job and if you ask for too little it could negatively affect your lifestyle. With that in mind I’ve put together a list of developer salary negotiation tips.

Developer Salary Negotiation Strategies

  1. Know your skill set – this may seem like common sense, however it’s vital that you know and can articulate your full set of skills since this is going to be one of the main factors that dictate your salary. You can start with listing out the programming languages you know, the frameworks that you’ve used, and put together a portfolio that showcases your expertise. As an example, if you’re a full stack developer who also has experience with data science you will be more a more valuable asset to companies that require a unique skill set like yours.
  2. Know the industry – over the years I’ve been fortunate to work as a VP of Engineer and a software Director in the oil and gas industry. The oil and gas industry has historically had a difficult time attracting software developers compared with other sectors, and because of that developers are able to command a premium salary. I would make a much different salary if I applied to work for the automobile manufacturing industry compared with the oil and gas space. Therefore it’s important to understand what industries pay for developers and not to simply assume that the same skill set is paid the same amount across all sectors.
  3. Know the organization – no matter what your skill set is and what industry you’re working in, no factor will determine your salary as much as the organization itself. If you’re applying to work for a bootstrapped startup you’ll be paid significantly less compared with a startup that just finished raising $20 million of venture capital. It’s been my experience that small to medium sized companies, with around 500-1000 employees pay the most. If you are applying to work with a bootstrapped startup, they may be willing to negotiate with stock options which could eventually lead to a much larger payday than any salary would, so that is also important to keep in mind.

With all of that in mind, how can you research salary rates? You can always simply Google “software developer salary” and then name the industry that you are interested in. However I typically like to use Glassdoor, which I’ve found to have the most accurate salary rates. You can also have it filter by the location that you want to work in. One key item to keep in mind is to test out multiple job types. For example, when I search for ‘web developer’ jobs in Scottsdale, AZ, it showed an average salary of $65,000, however when I looked up ‘software developer’ jobs in Scottsdale it returned an average salary of $78,000. That’s a pretty big salary bump for a single word difference, so make sure that you check out all of the potential job types that you’re interested in.

I hope that this guide has given you a system for negotiating your next salary.

developer salary negotiation

Guide to NoSQL Databases for Developers


So first and foremost: what are NoSQL databases and why should I care about them? The easiest way to understand the definition is that NoSQL databases are not SQL databases. Standard relational SQL databases such as Oracle’s SQL server or MySQL have a tabular structure, similar to what you’d see in an Excel spreadsheet. Whereas NoSQL databases have various types of formats and can therefore be more flexible.

For example, imagine that you had to build an application where users were able to define their own fields, such as a survey application where one user may create a survey with two fields and another may create a survey with a hundred fields, and they need to have the ability to be named on the fly. Technically it would be possible to implement this with a relational database, however it would be very clunky. However NoSQL databases could handle this easily, by allowing the fields to be created dynamically and then each record would could be stored with its unique characteristics.

It’s important to note that one of the greatest strengths of NoSQL, it’s flexibility, also presents its greatest challenge. Imagine that you are building out an inventory application that has fields that need to connect to other tables, such as a user table for the employee entering the information, a vendor table, and a tax table to calculate depreciation. If you were to attempt to implement a NoSQL database for this inventory option you’d end up having to work very hard to map the values between the models and it would also make for a very difficult application to maintain. In this case study a relational database (rdms) would work perfectly.

So when you’re trying to decide on which database to use, it really comes down to what the requirements of the application are. If you wanted to chop a tree down you wouldn’t use hammer, you’d use an axe because it’s basic common sense to utilize the right tool for the right job. And it’s the same way with software development, I don’t believe in the SQL vs NoSQL debate, they are both tools and they are the most effective when used in an application that works well with their strengths.

A good rule of thumb is to simply follow the guidelines given by the names themselves:

  • If you have data that relies heavily on relationships then it’s probably the best fit to utilized a relational SQL database.
  • If you have an unstructured data set that needs flexibility, than it may be the best option to go with a database that is Not SQL, such as a NoSQL database.

For an example of how NoSQL looks, here is a snippet from a MongoDB database:

nosql example

Notice how it really just looks like JSON code? It actually is using a form of JSON called BSON, short for Binary JSON and it really is just a set of key value pair data stores that can be structured however your application needs.

This is in comparison with this relational SQL table, notice how NoSQL databases encapsulate all of the data into a single object whereas the SQL structure is built around relationships?

example of sql

That’s really the key difference in understanding how they work.

If you’re interested in building applications with NoSQL databases it’s important to understand that there is no such thing as a standard NoSQL database, there are many different variations. There are Key/Value pair stores, wide-column family stores, document databases, and graph databases. I’ll place a link in the show notes where you can explore each type and see what will work best for your application.

Resources for NoSQL Databases

nosql databases

Client Communication Freelancing Tips


You’ve made it through the week, nice work! On Friday’s I cover various topics related to building a freelance developer business based on my own experiences and today I’m going to discuss how to have effective client communication.

When I was originally building up my freelance business I heard a common complaint from clients talking about previous developers that worked on their projects: poor communication and a lack of transparency.

As a developer I know how hard it is to fall into the trap of wanting to dive into the code and build a project, however without proper client communication you’ll run into the following issues:

  • Clients will think that no work is being performed. Regardless of reality, if you don’t tell a client what you did their first assumption is going to be that you didn’t do anything. This can get very messy when you send your bill and the hours that you charged don’t match what the client estimated based on your updates.
  • You may be building a feature in a way that the client didn’t expect. I’ve had it happen a number of times where I understood a requirement to mean one thing, but the client had a completely different expectation in mind.

While the immediate reaction to try and fix communication issues may be to be in constant communication with the client, this approach will waste your time and it will also give them the mindset that you’ll always be available, which will limit your freedom, which kills one of the main reasons you became a freelancer in the first place.

So with these issues in mind I’ve put together a system for client communication that is balanced, meaning that the client will feel informed about the project but it will not inhibit your personal freedom. If you can perfect this part of being a freelancing you’ll see that it leads to happy customers while also being a healthy environment for you as a freelancer.

System for maintaining proper client communication

  1. Create a project management dashboard, I’ll typically use Basecamp or Trello, however you can use anything that you prefer and is easy for the client to use.
  2. At the beginning of the day schedule when you’ll work on the project. Each morning I write down on a dry erase board all of the projects I’m going to work on, and I list what time slots I’m going to work on them. For example: I’m going to work on Rails project for XYZ client from 2pm-3:30pm.
  3. After the schedule is set I message the clients and I let them know when I’ll be working on their project so they can contact me during that time slot if they need something immediate and they will also know that work is going to be performed that day.
  4. After each project time slot that day I post on the project dashboard an update on the tasks that were worked on that day. Because I like being efficient with time I’ll usually copy and paste the GitHub commit comments as bullet points.

If you follow this system your clients will be happy because they will know what you’re doing each day, and it lets your stay in control of your schedule.

client communication

ActionCable Overview for Rails 5 Applications


On Thursdays I cover a technology topic that affects the developer community, and today I am going to given an ActionCable overview, which is a new feature in Rails 5.

I attended RailsConf 2015, where DHH gave a high level view of Rails 5 and discussed how it’s going to help bridge the gap between classic style Rails apps and the new client side MVCs. As no big surprise, being the founder of the Ruby on Rails framework, DHH is not a fan of SPA type apps.

If you’re new to web development, client side MVC or SPA applications are web apps that have a separate backend and front end. They usually use a JavaScript framework, such as AngularJS or React for the front end, and then a framework like Rails on the backend. I’ve personally never been a huge fan of client side MVCs when they’re built on top of a Rails application since I was not a fan of the extra work I had to do in order to get the two sides working together. However I’m not going to get into that debate, I have good developer friends who absolutely love client side MVCs and are very passionate about them and I have no issues with them, I just choose not to use them myself. However I think it’s important to discuss why client side MVCs have grown in popularity at the rate that they have over the past few years.

JavaScript frameworks such as AngularJS have powerful tools that allow applications to “magically” update. If you have ever had an application open and all of a sudden a message popped up, such as being on Facebook and having a friend send you a message, there’s a good chance that a client side MVC was used to accomplish this functionality. Up until now it was pretty difficult to build in features like this into a Rails application because they use standard, stateless RESTful requests.

However, in Rails 5, ActionCable looks to change this and bring real time data communication within reach for Rails developers without having to use an outside JavaScript framework.

ActionCable overview:

  • Who: it was developed by the Rails open source community.
  • What: it is a module in Rails 5 that leverages WebSockets to bring state to an application. This means that your users won’t have to change or refresh a page to get new data, it can be pushed to them from the application itself. Also note, it doesn’t require archaic forms of development, such as polling.
  • When: it is available now, and will be officially released when Rails 5 is considered the stable version.
  • Where: you can get it from the Rails github repository
  • Why: this is important since users are now expecting to have the ability for applications to be more dynamic, having stateless apps aren’t good enough anymore, and a tool like ActionCable will let you deliver real time data and updates to users while still within the Rails framework ecosystem.
  • How: ActionCable creates the concepts of Channels, where you can perform asynchronous data transfers, both requests and responses from within the application files.

I hope this was a helpful ActionCable overview for understanding what it is and how it can be helpful for your Rails applications, I’ll also include links to tutorials so you can try it out for yourself, and good luck with the coding!


ActionCable overview