Home Blog Page 25

FTP Tutorial – Understanding the File Transfer Protocol

0

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

0

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

0

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

1

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

0

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

1

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

0

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

1

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!

Resources

ActionCable overview

How to Study and Understand Complex Topics

5

On Wednesday’s I cover a random topic related to development and today I’m going to discuss how to study and comprehend complex topics.

When I was younger I used to struggle learning a new or difficult subject, and through the years and about a decade of university and grad school have helped me put together a strategy for how to study and understand complex topics. Typically I apply this learning system to subjects such as algorithms and software engineering, however it can be applied to any topic.

While there are a near infinite set of study straggles out there, I like this approach because it utilizes a divide and conquer strategy, focusing on breaking a complex topic into easy to understand components, and putting the pieces back together at the end to see how they all work together.

System for How to Study

Let’s take a case study example: Understanding how logarithms work. Logarithms are used throughout the fields of mathematics and computer science, however unless you use them regularly it’s easy to get rusty on them.

1. The first task that I will do is take a piece of paper and write Logarithm in the center and circle it.

2. Next I’ll go to a comprehensive post on the topic, such as one on Wikipedia. In reading the first sentence I come across a few terms that are a bit fuzzy:

Inverse operation

Exponentiation

I will stop reading the logarithm article and go and read those two articles until I feel comfortable with what they represent. After I feel good about those two items I write them as their own circles that connect to the Logarithm circle. I will also add any examples that will help me understand what the terms mean if necessary.

3. Next I’ll go back to the original Logarithm post and keep going through the article repeating this process until the entire page is filled with a mind map that explains each component that makes up logarithms and how they work together. This may include base case examples, such as:

64 = 2^6 is the same as log 2 (64) = 6

If this seems like a dead simple approach to study… it is. The goal of studying is to learn a topic, and one of the easiest ways to understand a complex subject is to break it into easy to comprehend components.

For example, if you’re trying to understand an advanced algorithm in computer science from scratch you may feel a little intimidated. However if you break the algorithm down into small enough components you’ll see that it’s essentially a process of steps made up of connecting simple modules such as loops, manipulating variables, and using conditionals.

A problem is only hard when you try to think of it as a whole, however any concept can be understood if you simplify it down to easy to comprehend pieces. Obviously the more complex the topic, the longer it will take to deconstruct, however I am a firm believer that anyone can understand any topic assuming they dedicate themselves and put the work in.

I hope that you can leverage this mind mapping process to understand complex topics and that it will help you learn how to study properly and truly learn.

how to study

Greatest Weakness Answers for Coding Interviews

1

On Tuesday’s I cover various strategies for preparing for a coding interview job, and today I’m going to discuss how to answer the question of: what’s your greatest weakness?

To be 100% honest I’m not a huge fan of this question since it’s a lose/lose question: if the individual being interviewed is completely honest they probably won’t get the job, and if they give a flat out lie it will be evident very quickly. However throughout the years I have had several managers ask me this question, so it’s important to have a well thought out answer ready.

Since I’ve been on both sides of the interview chair, I have put together a list of the worst ways to answer this question and then some of the best answers.

Bad answers to your greatest weakness

Hard time saying no – this will say that you are weak and will take on too many projects, typically resulting in poor performance.

Can have a hard time staying on a single task – this means you should probably either learn how to focus or that you are supposed to be an entrepreneur, working for a company usually means long hours on long, repetitive tasks, and if someone is bouncing from project to project they’re not going to be a good asset to the team.

Can be arrogant – I had a professor in grad school, Dr. Richard Gelfond, who is one of the most brilliant computer scientists I’ve ever known, who said this about arrogance: “Being arrogant occasionally doesn’t matter, but it’s never good”. An arrogant employee won’t be able to work well with others and will have a hard time taking correction or learning anything new… because they already know it all.

Good answers to your greatest weakness

Can be slow to take action – this is an interesting answer because it could be a bad answer if you leave it at this since it might tell the interviewer that you are timid, which would be a poor character trait. However if you follow it up by saying that you are very detailed and that before you start a task you want to have a clear strategy for how to move forward, that is an employee I want to have on my team!

Can be overly critical on myself – this will tell the interviewer that you care about your work and that doing it well is very important to you. Make sure to follow up with how you’re working on yourself so that you still are working on being a craftsman at your work but to not get on yourself for irrelevant reasons.

Can be quiet – this is one of my favorite things to hear, assuming that the individual follows it up by saying that they can be quiet because he or she thinks that it’s important to listen to all of the details of a project or challenge before giving an answer. This tells me that the individual is going to be detail oriented and won’t miss key items because they were too busy thinking what they were going to say next.

I hope that these strategies help you answer the question of: What’s your greatest weakness? And good luck with the interview!

greatest weakness