DBC Blog

A Look At Some of The Things I Learned During Phase 0.

DBC Cheat Sheet

| Comments

Ruby Hashes, Arrays, Strings, Integers


If you attempt to access a hash with a key that does not exist, the method will return nil.

You can create an empty hash with the new class method:months = Hash.new

You can also use new to create a hash with a default value, which is otherwise just nil:months = Hash.new( "month" )ormonths = Hash.new "month"

You can use any Ruby object as a key or value, even an array, so following example is a valid [1,"jan"] => "January"

A list of useful methods.

hash.delete_if { |key,value| block } Deletes a key-value pair from hash for every pair the block evaluates to true.

hash.each { |key,value| block } Iterates over hash, calling the block once for each key, passing the key-value as a two-element array.

hash.each_key { |key| block }Iterates over hash, calling the block once for each key, passing key as a parameter.

hash.each_key { |key_value_array| block }Iterates over hash, calling the block once for each key, passing the key and value as parameters.

hash.each_key { |value| block }Iterates over hash, calling the block once for each key, passing value as a parameter.

hash.empty?Tests whether hash is empty (contains no key-value pairs), returning true or false.


Creating Arrays:
One way is with the new class method:names = Array.new
You can set the size of an array at the time of creating array:names = Array.new(20)
here is another method of Array, []. It works like this:nums = Array.[](1, 2, 3, 4,5)
One more form of array creation is as follows :nums = Array[1, 2, 3, 4,5]

A list of useful methods.

array.clearRemoves all elements from array.

array.collect { |item| block } [or]``array.map { |item| block }Invokes block once for each element of self. Creates a new array containing the values returned by the block.

array.collect! { |item| block } [or] array.map! { |item| block }Invokes block once for each element of self, replacing the element with the value returned by block.

array.delete_if { |item| block }Deletes every element of self for which block evaluates to true.

array.each { |item| block }Calls block once for each element in self, passing that element as a parameter.

array.each_index { |index| block }Same as Array#each, but passes the index of the element instead of the element itself. array.empty? Returns true if the self array contains no elements.

array.eql?(other)Returns true if array and other are the same object, or are both arrays with the same content.


A list of useful methods.

str * integerReturns a new string containing integer times str. In other words, str is repeated integer imes.

str.capitalizeCapitalizes a string.

str.casecmpMakes a case-insensitive comparison of strings.

str.chopRemoves the last character in str.

str.downcaseReturns a copy of str with all uppercase letters replaced with lowercase.

str.include? other_str [or] str.include? fixnumReturns true if str contains the given string or character. str.reverseReturns a new string with the characters from str in reverse order.

str.split(pattern=$;, [limit])Divides str into substrings based on a delimiter, returning an array of these substrings. If pattern is a String, then its contents are used as the delimiter when splitting str. If pattern is a single space, str is split on whitespace, with leading whitespace and runs of contiguous whitespace characters ignored.

str.swapcaseReturns a copy of str with uppercase alphabetic characters converted to lowercase and lowercase characters converted to uppercase.


A list of useful methods.

next → integer Returns the Integer equal to int + 1, same as #next.

pred → integerReturns the Integer equal to int

odd? → true or falseReturns true if int is an odd number.

Round([ndigits]) → integer or floatRounds int to a given precision in decimal digits (default 0 digits). Precision may be negative. Returns a floating point number when ndigits is positive, self for zero, and round down for negative.

chr([encoding]) → stringReturns a string containing the character represented by the int‘s value according to encoding.


| Comments

Week Eight Cultural Blog Post

March 29, 2015

Conflict and How To Deal With It.

Today I will be writing about a conflict I had and looking back at it.

out what is inside it looks like my handbags are a lost but the laptop bag is visible. So now I’m waiting to find out if the laptop is in it.

A few months ago I flew to Fl. with some friends for a wedding. At the airport one of my friends was getting out of hand and acting as if the wedding and the drinking had started. It was very embarrassing walking through the crowded airport with him screaming and cursing I asked him to calm down and to please stop making a scene, he refused and the fight started.

Looking back at the conflict the major emotions I was feeling were embarrassment and frustration. The actions that I took then to try and solve the problem were to speak to him and to try to get him to realize that he was making people uncomfortable.

If I can change the past I would go back and and change the way I spoke to him. I would speak in a calm and collected manner and not show him my aggravation.

I learned from this experience to control my emotions better and not to let the other person see that he or she has effected me.

Combating Stereotype Threat

| Comments

Week Seven Cultural Blog Post

March 22, 2015

Values in my life

Last week I wrote about Stereotype Threat and this week I will be addressing some values in my life that I feel can help me avoid it and work around it.

Some of the times in my life when I’ve been the happiest, the proudest, or the most satisfied have been when I have felt accomplishment and competence. I think that both of these values are important to to have to help yourself and to build self confidence. When a person feels that they have accomplished something noteworthy they are buoyed by that fact and it helps them later on when they fail at something and want to give up.

I think that if someone is experiencing Stereotype Threat they can think back at all they have accomplished and shake off the feeling that they are not good enough just because people think so. Innate self worth is important to everyone in every stage in life.

Stereotype Threat

| Comments

Week Six Cultural Blog Post.

March 15, 2015

What is Stereotype Threat?

This week I will be writing about an issue called Stereotype Threat. To quote from Wikipedia: “Stereotype threat is a situational predicament in which people are or feel themselves to be at risk of confirming negative stereotypes about their social group.” In other words it is a mechanism that can cause lowered intellectual performance in the person that is experiencing it.

Thankfully to my knowledge I have not been impacted by Stereotype Threat. Being a religious Jew I have heard from my grandmother how the daily discrimination she faced in the former Soviet Union, impacted her in every facet of life. Unfortunately even here in the United States there are people that are being discriminated against even if not in a institutional way. This discrimination effects them even many years down the road.

In my opinion one of the things everybody can do to reduce the occurrence of Stereotype Threat is by providing role-models that actively disprove the racial stereotype and show that no matter who a person is it can be done.

Dealing With Human Beings.

| Comments

Week Five Cultural Blog Post.

March 8, 2015

Pairing and Feedback.

Today I will be talking about something that was absolutely foreign to me before I joined DBC.

I have always been a loner when it came to work. It might not have been on purpose but that is the way it has been for as long as I can recall. When I read in the Phase 0 manual about mandatory pairing I was worried that it would be stilted for me and unproductive. The first few pairing sessions seemed to support my hypothesis as they were not hard but I did not feel like I was gaining much from them. However when I started pairing on actual coding challenges the time flew by and by the end of the session I was very proud of my work. Initializing a pairing session is still hard for me but once I get into the meat of the issue it becomes us vs. the code.

In DBC pairing does not come alone. After every session you have to leave feedback for your partner. Reading some of the feedback I received in the beginning was hard. I knew I had to improve but it is easier to blame others but my own shortcomings. Determined to do something about it I started off every video call with a disclaimer: “I have been informed that sometimes I can get ahead of myself and speak too quickly possibly overriding your ideas. If you feel that I am doing that please point it out to me and help me I am trying to change”. Ever since then my feedback has improved and I have and overwhelming majority of positive feedback.

Writing feedback on the other hand is another animal entirely. It is hard to point out something that is bothering you about your pair particularly when the session has gone swimmingly otherwise. What I learned is that the session in general has to be framed was it good, great or just mediocre? Once the outline has been written it is easier to write feedback that confirms to the three rules. A.S.K (Actionable, Specific, and Kind)

In conclusion DBC’s system has helped me immensely, notwithstanding the fact that it was extremely hard for me in the beginning to give and receive feedback the correct way. Once I had gotten over the hump I actively look to see what feedback I have been given and how I can improve based off of it.

Leaping Before Looking

| Comments

Week Four Cultural Blog Post

February 28, 2015

Technology Doesn’t Always Work.

We have to face the facts, tech does not always work and when it fails the results can be disastrous. There are a plethora of examples to choose from, from aircraft that are stuck on the ground because the computer systems in the control tower are down, to aircraft that fall out of the sky. On a weekly basis some thing on this earth malfunctions and people get hurt.

To exacerbate the situation a lot of technology gets pushed into mainstream use before it is finished and the major bugs worked out. From new medical treatment to wearable gadgets, technology has a history of failing at first. Unfortunately people die from these mishaps.

I.m.h.o. many of these disasters can be avoided if the people that make the decision to release the technology have training in that field. This does not mean that the entire board has to be PHDs rather the final arbiter for release should be a third party that is involved and qualified in the field. This removes the monetary pressure to release tech that is faulty and at the same time leaves a clear chain of responsibility in event of a preventable bug.

Mind Over Matter

| Comments

Week Three Cultural Blog Post.

February 22, 2015

Thinking Styles

We have just finished Unit One in Dev Bootcamp. It was tough it was fun and most of all it was a lesson to myself about myself. I know that sounds pretty strange but bear with me. One of the main tenants of DBC is feedback. Looking at the feedback I have received over the past three weeks has made it obvious to me what I have to work on.

After getting accepted to DBC we had to fill out a long questionnaire about ourselves and how we think. One of the objects was to identify what type of learner we are. According to Anthony F. Gregorc’s Mind Styles there are four main qualities that people have when it comes to learning and assimilating information. Each type has its’ own strengths and weaknesses. For more information seehere. To quote him “No one is a “pure” style. Each of us have a unique combination of natural strengths and abilities.“ But each person has one stronger “ability” in the way he interacts with learning.

When I took the quiz to test my learning pattern(link is here) overall it was pretty equal with one pattern edging out the others by one point. For me it was Abstract Sequential (AS). Looking at the list of what an AS type of learner likes and dislikes brings me right back to my earlier musing on feedback. In most of my feedback I have been given there is a sentence there about me going too fast or speaking over the other person. Working on this and the rest of the items on the list of what is hard for AS learners will be my personal challenge over the next few months at DBC.

Fireside Chat

| Comments

Week One Cultural Blog Post

February 6, 2015

Getting there one step at a time.

Learning is fun, exhilarating, life changing and scary. Looking back at the past week I can see a glimpse of the future. Hard work and much satisfaction is my fate.

It is difficult to take a small fraction of time and extrapolate what will be for the next 18 weeks. But after reading, listening and watching about DevBootCamp I can honestly say that my expectations have stayed true to form. This week is the first taste of a delicious feast. I have been looking for a long time for a structured learning environment where I can learn and grow. I am excited and thankful that I have found DevBootCamp.

After receiving the curriculum I was feeling overwhelmed, so much to do; so little time. However after going through the challenges and seeing how competently they were arranged I feel that I can swim. The greatest thing is that I am not going about it on my own. I have my cohort and instructors to support me. The tools are being given to me but I will have to make them my own.