July 16, 2020

The First Mile

The first mile of the software engineering bootcamp at Flatiron School introduces a lot of basic programming concepts that are important to learn. Luckily, I do have some experience with these, so I'm sure it came a bit easier to me than to others.

Technicals

All of the basic bases are covered. Data types (strings, arrays, integers, etc.), conditional/if statements, loops, methods, classes, and more!

Given my previous exposures to coding, I was already familiar with the basic concepts. Programming languages are essentially the same concept wise, but syntactically they are different. So, I learned a lot about the Ruby syntax.

I also took a lot from the later lessons when we introduced classes, instance variables, constants, and object models. This is a section I did not have as strong of a foundation on, so it was definitely the area where I learned the most.

  class ClassName
      variable = ""
      def Method(arg)
          @instance_variable = []
      end

      def AnotherMethod(arg)
          arg.collect {|x,y| y <=> x}
      end
  end

Above is just a little sample of Ruby syntax. Below is a simple example from my last lab that I refactored to something shorter and easier to read.

    def add_item(title, price, quantity=1)
        @total += price * quantity

        quantity.times do
            @items << title
        end
        @last_tran = price * quantity
    end

    def apply_discount
      if discount != 0
        @total = (total - ((total * discount) / 100)).to_i
        "After the discount, the total comes to $#{@total}."
      else
        "There is no discount to apply."
      end
  end

Changed to:

    def add_item(title, price, quantity=1)
        @total += price * quantity
        quantity.times {@items << title}
        @last_tran = price * quantity
    end

    def apply_discount
        if @discount != 0
            @total = (@total - ((@total * @discount) / 100)).to_i
            "After the discount, the total comes to $#{@total}."
        else
            "There is no discount to apply."
        end
    end

Before taking signing up for this bootcamp, I almost chose another because I wasn't really interested in learning Ruby.

But, now after using it and learning some of the syntax, I'm actually liking it quite a bit.

I've also been paying attention to how I can write things in different ways. I've been trying to refactor my code as much as possible. Keeping it neat, short, and readable.

Non-technicals

Outside of the programming stuff, the first mile also requires you to be a self-starter. This is an online program. So, it can be extemely easy to get distracted by other things and end up procrastinating. It is important to manage your time well and compelete the work on time.

You also need to learn how to utilize all of the resources available to you and be a problem solver. Software engineering is problem solving. If you don't know the answer, you should know how to find it. If you still don't understand it, you should know how to find out more information.

The Slack channel and community are also important in that aspect. I have met a couple cool people so far and they have always been helpful when I ask.

So far, the experience has been great.

I never had an interest in Ruby, but now it is growing on me. I've learned a lot of new things and I've also met a few cool people as well.

tags: bootcamp code