Home » /Home

Tech Ladies and The Job Search

I can’t go back to Pitt this semester as the funds ran dry. I had been planning to search for work after the semester. I’m still searching, just probably before I had planned. This is where Tech Ladies helps with my job search.

Enter Tech Ladies

I found a tweet on my Twitter feed about Ladies in Tech™. I found the tweet intriguing and checked it out.

Tech Ladies™ 1 is a site/company all about connecting women and WOC to tech jobs who are open to a diverse workforce.

You need to be approved but after that, you get access to their job board and the closed Facebook group 2.

I got approved to their Facebook group and lurked for three weeks. I felt a bit intimidated: here were highly educated women with more money than I’ve seen in my entire adult life 3. I have 3/4 of a BSc in Computer Science and am not employed. I felt a little out of place.

With some prodding some of my good friends I decided I’d speak up. I am so glad I did:

INTRO

Hi! I’m Tiffany. Been a part of the group for a couple weeks just lurking. Pretty damn shy.
I am a junior dev looking to break into tech. I am older than most in the techsphere so I feel like I am bound to the East Coast for positions though I’d like to go out West at some point.
I was a CS major at the University of Pittsburgh but funds ran out. I am worried about that as well.
I am steadily working on projects, posting them to GitHub, and hoping someone will take a chance on me eventually. I plan to start applying in the spring.
Nice to meet all of you.

The response I got was amazing. Several other Pittsburghers chimed in and wanted to meet up. I got some advice about attending meet ups 4. Being nervous about not finishing my degree, someone spoke up about moving to Pittsburgh and getting a dev job and not having a CS degree. She got in relatively easy, and to PM her. I added her on Facebook Messenger but have yet to question her, which I plan on doing tonight 5.

Job Search Starts Early 2018

I wanted to wait until Spring/Summer to start looking for work. I think I am almost ready. But I will probably start sometime in February.

Tech Ladies has a sh!t ton of jobs for us. Looking forward to the search!


  1. It’s free but for $99/3 mo. you get more features. 
  2. You need to answer some questions to get in similar to the questions to get into their job boards. 
  3. You don’t have to make much to get that distinction. 
  4. That’s on my to-do list for next month. I’ve lost a good bit of weight unintentionally so I will feel a bit more comfortable being at them. I’ve always felt weird in places like this as I am a really tall, just all around hulking human being. I scare little kids. Ha. No. I really do… 
  5. I’m such an introvert I need to mindmap emails to people. Ha. 

Gauging My Progress

As I step through The Web Developer Bootcamp, I am beginning to realize just how much I’ve learned the last two years and how it is beginning to codify in my brain.

I am coming from a Humanities background but I have always had technical chops, working with circuits was a thing I liked to do; improvising is fun.

I was, a long time ago, a Computer Networking major but decided that I wanted to build computers instead of administering them. Before class started I chose Electronics Engineering Tech at my local 2 year. I did very well. I got an A in my first class, being the only black person as well, by the middle of the semester, the only female. This was the early 2000s.

I’ve always had technical chops. In fact, I taught myself electronics over the course of two years and was competent enough that my physical science professor wanted me to help her teach the electronics section. She was a physicist and my hero.

I prefer being an autodidact, if you haven’t guessed by now.

Translating Hardware Chops into Software Chops

I just played around with circuits and diagrams of those circuits with basic logic structure knowledge. I had and have the ability to learn logically complex things. The fact that it has taken me two years and 5 CS classes as well as learning on my own makes me feel really silly. I have always been the smartest person in the room. It is quite humbling to struggle with something that you feel you should get right away.

Sometimes I look at other newbies and see they struggle with simpler concepts than I did. It makes me feel better 1 but I also want to help them become competent.

The Web Developer Bootcamp and Leveling Up

I have been studying for two weeks practically non-stop. I am seeing so much progress that it encourages me to keep going. I can ask relevant questions of the material, when I get stuck instead of running to Stack Overflow or Slack/Gitter first thing, I open up Dash Docs and read the MDN, which is beginning to make a lot more sense to me.

I can write simple algorithms much more easily than just a few months ago. I don’t know what happened or what switch flipped but I am really, really happy.

Being Happy For Other Developers Success, However…

I see developers all around me getting jobs. I am happy. I am really happy for them. This isn’t a fake happy. It is how things should work. You never begrudge another’s success.

I do, however, feel a pang of longing when I see the tweets and YouTube videos. I am waiting for my turn.

The helpful thing for me right now is knowing I am about a little over a half a year from being ready to apply for developer jobs. It is the solace I need to not get discouraged.

The Code

Some of the things I worked on.

Arrays

//Print Items in an Array in reverse //

function printReverse(arr) {
  return arr.reverse();
}
printReverse([1, 2, 3, 4]);

// Refactor to print on new line
function printReverse(arr) {
  for (var i = arr.length - 1; i >= 0; i--) {
console.log(arr[i]);
  }
}
printReverse([1, 2, 3, 4]);

// isUniform //

function isUniform(array) {
  for (var i = 0; i < array.length - 1; i) {
    if (array[i] !== array[i + 1]) {
  return false;
   }
 }
  return true;
}

// sumArray //

function sumArray(arr) {
  var sum = 0;
  arr.forEach(function(element) {
    sum += element;
 });
  return sum;
}

// max //

function max(arr) {
  var maxValue = 0;
  arr.forEach(function(element) {
    if (maxValue < element) {
  maxValue = element;
    }
  });
  return maxValue;
}

Objects

//Movie database for object practice

var movies = [
  {
title: "Taxi Driver",
hasWatched: true,
rating: 5
  },
  {
title: "The Social Network",
hasWatched: true,
rating: 5
  },
  {
title: "Steve Jobs",
hasWatched: true,
rating: 4.5
  }
];

function stringBuilder(movie) {
  var result = "You have ";
  if (movie.hasWatched) {
    result += "watched";
  } else {
    result += "has not seen";
  }
  result += '"' + movie.title + '" - ';
  result += movie.rating + " stars";
}

movies.forEach(function(movie) {
  console.log(stringBuilder(movie));
});


  1. The arrogant, competitive little snot I was still peeks through sometimes. 

Scope for Beginners

In JavaScript, lexical scope deals with where your variables are defined, and how they will be accessible — or not accessible — to the rest of your code.

There are two terms to think about when talking about scope: local and global. These two terms are important to understand, because one can be more dangerous than the other when declaring variables and executing your code.

A variable is globally scoped if you declare it outside of all of your functions. For example:

//global variable, i.e. global scope
var a = "foo";

function myFunction() {
    var b = "bar";
    console.log(a+b);
}

myFunction();

When a variable is in the global scope, it can be accessed by all the code in the same JavaScript file. In this example, I’m accessing the variable a in my console.log statement, inside the myFunction function.

Local Scope

Local variables only exist inside functions. They are scoped to that individual function.
You can think of local variables as as any variables that fall between an opening and closing curly brace.
These local variables can’t be accessed by code outside of the function to which they belong.

Take a look at this code:

//global variable, i.e. global scope
var a = "foo";

function myFunction() {
    //local variable, or local scope
    var b = "bar";
    console.log(a+b);
}

function yourFunction() {
    var c = "JavaScript is fun!";
    return c;
    console.log(c);
}

myFunction();
yourFunction();

Notice how the variables are each declared inside separate functions. They are both local variables, in local scope, and can’t be accessed by one other.

For instance, I can’t return b in yourFunction, because b belongs to myFunction. b can’t be accessed by yourFunction, and vice versa.

If I were to try to return the value of b when calling yourFunction, I’d get “error: b is not defined.” Why? Because b doesn’t belong to yourFunction. b is outside of yourFunction’s scope.

When adding nested conditionals, scope gets even more hairy. But I’ll leave that for another time.

But for now, remember the difference between global scope and local scope. And the next time you get a “is not defined” error, check the variable’s scope.

The Execution Stack and Scope

What is the Execution Stack? Before I answer that question, we’ll first have to take a look at the Global Execution Context

The Global Execution Context, in general terms, is the environment in which the function gets invoked, or the variable’s scope. The Global Execution Context, creates global object, a window object, and a this variable in its creation phase as well as storing any variables you’ve made stored in memory.

The first function gets created on the global execution context called an, as you probably guessed, execution context and has its own space for variables and functions. The global execution context reads line by line until it comes to the next function. Every function creates a new execution context. Once there are no more functions to execute the top function on the execution context gets popped off. Whatever is at the top is currently running.

The Global Execution Context, then, is the outer portion of the Execution Stack or Call Stack. The functions that are invoked in the Execution Stack are lexically sitting on top of one another and being called from top to bottom. JavaScript is a synchronous language, which means the code you write gets executed line by line, from top to bottom.

Talking About the Scope Chain

So how do the execution stack and the scope chain come together? It depends on where the function sits lexically. Take a look at this code:

function myFunction() {
console.log(myVar);
}

function yourFunction() {
var myVar = 68;
yourFunction();
}

var myVar = 37;
myFunction();

The execution stack has to search for the variables you defined and where you defined them, making references to the outer lexical environment. This is called the scope chain.

When this code is executed, since the scope chain can’t find myVar in function yourFunction() because it isn’t lexically in the local scope (remember your scopes) and the outer reference is in the global execution context, the console.log will display 37.

If we were to change where function yourFunction() sits lexically in the execution stack, for instance:

function myFunction() {
    function yourFunction() {
    console.log(myVar);
    }
    
    var myVar = 68;
    yourFunction();
}

var myVar = 37;
myFunction();

Everything is created along the same lines. The global execution context is created, myFunction() sits on top of the global execution context, yourFunction() sits on top of it. But when the scope chain looks for its outer reference lexical environment this time, yourFunction()’s outer reference lexical environment is myFunction() because yourFunction() sits lexically inside of it.

This is how, under the hood, local and global scope function. For further information see: ECMAScript Docs

Working With Arrays, Part 1

This will be a series on working with arrays. Not sure how long it will be but there is so much rich information about arrays in JavaScript that I don’t think I could fit it all into one post. It may not be a series after all; I may just revisit the topic every now and again.

Arrays

An array is an object in JavaScript. It is a global object set out in a list between two brackets []. Elements in an array are separated by a comma. An array can have any type of data, in any order, inside of the brackets.

For instance:

var myArray = ["John", 39, "Tiffany", 37, false];

is a typical array. Usually we can get the index, or position, of a piece of data in an array by bracket or dot notation.

Arrays in JavaScript can have a mixture of data types; in my example above I mix strings, numbers, and a boolean data type in one array.

Initializing an Array

You can initialize an array as follows:

var myArray = [10];

You can also initalize an empty array such as:

var emptyArray = [];

This is useful for having a place to hold values that will be initialized later in your code.

Accessing Array Elements

You can access array elements by their index in the console. JavaScript arrays are zero-indexed, much like Java and other languages. An example of the syntax:

var indexOfArray = ["Jerri", 69, "Tiffany" 37, false];
console.log(indexOfArray[4]); // This would return the boolean value 'false'
console.log(indexOfArray.[2]); // This is accessing an array with dot notation. 
// This would return 'Tiffany'

console.log(indexOfArray.1); // This isn't proper syntax as properties that begin with 
// a number can't be accessed using dot notation
console.log(indexOfArray.0); // This is okay as it is a string

The .length Property

You can see how many items are in an array with the .length property. The syntax is similar to accessing an index with dot notation:

var howMany = ["Jerri", 69, "Tiffany" 37, false];
console.log(howMany.length); // this will return 5 as there are 5 items in the array.
// Not to be confused with *indeces*

These are some basic facts about JavaScript arrays. Stay tuned for more.

Working With Arrays Part 2

What is an array?

You use an array to store data. You can initialize an empty array and then store data in it as well. But that is beyond the scope of this post.

There are 4 types of arrays in JavaScript:

  • Homogeneous
  • Heterogeneous
  • Multidimensional
  • Jagged (or ragged)

Homogeneous Arrays

Homogeneous arrays only store one data type. It can be any data type but it can only contain data of that particular type. For example:

// An array of ints
var array = [45, 37, 69, 90];

// An array of Boolean values
var array = [true, false];

// An array of Strings
var array = ["Mom", "Rick", "orange"];

Hetergeneous Arrays…

Can contain a mixture of data types. For example:

var anArray = ["peaches", 9, "cream", false];

Multidimensional Arrays

A multidimensional array is just an array of arrays. Think of them as nested arrays. For example:

var myArray = [["Mom", 71, "Me", 36], ["John", 40], [true]];

Jagged Arrays

A jagged array is an array that looks like a multidimesional array but does not have a particular order. They look like this:

var myArray = [
     ["Jerri", 70, "Tiffany"],
     ["37"],
     ["John", false],
 ];

An Empty Array

Is an array with nothing in it. For example:

var anArray = [];

This is useful for loops and adding data later to your program.

These are the types of arrays in JavaScript. I will cover arrays in Java as well.

Array Methods in JavaScript

"Methods"

Different Types of Methods

There are a few basic methods to work with arrays in JavaScript. The most basic and, perhaps the most familiar, is the .length() method.

You can get the length of the elements in an array with with this method and a for loop, which is an iterator/counter loop. For more information about for loops, check here.

An example of iterating through an array with a for loop to find the index of an element:

var array = ["Tiffany", "Cheerios", "ice cream", "pig", "Macbook"];
    
for (var i = 0; i < array.length; i++) {
    var index = array[i];
    console.log('Index: ', index);
}

This will list all the elements in the array to the console, as well as an undefined since I’m not returning a value.

forEach() Method

Another method worth noting is the forEach() method which is another iterator and perhaps more syntatic sugar than a for loop. It is worth mentioning that forEach() has perf costs and for large records and datasets, a for loop would be a better choice.

An example of a forEach on an array would look like this:

var array = [1,2,3,4,5,6,7,8,9,0];
     
array.forEach(function(item, index) {
     console.log(item);
 });

This does essentially the same thing as a for loop only it is cleaner and perhaps easier to use.

map() Method

This method creates a new method from elements in an old method using a callback function with three arguments: currentValue, index, and array.

You can use map()to parse an array of objects or return a new array full of different number sets than the previous array. For instance:

var even = [2,4,6,8];
    
var odd = even.map(function(num) {
    return num + 1;
});

is something I could use to find and return a new array of odd numbers from an old array of even ones.

concat() Method

This method just concatenates two arrays into one. For instance:

    var greetArr = ["Hello", "World!"],
    jsArr = ["Javascript", "is", "fun!"];
    
    var jsGreet = greetArr.concat(jsArr);
    
    console.log(jsGreet);

This will concatenate the arrays out to look like this:
["Hello", "World!", "Javascript", "is", "fun!"]

While we don’t want the commas in between the words, this gives you a basic idea of what concat does.

Thoughts

These are just some of my favorite array methods for JavaScript. There are way more and you can find them in the Mozilla docs.

Primitive Data Types in Java

Variables in Java need to be declared before they can be used in Java because it is a statically-typed language. Because of this, you need to state the type of variable you are declaring.

A variable’s data type tells Java what type of data the variable contains. For instance, an int contains an integer value. You can perform operations on the int data type like any other value number value.

There are 8 primitive data types in Java. Primitive types are defined by Java and cannot be used elsewhere in your code. 1

The primitive data types in Java are:

  • int: -231 – 231-1
  • short: -32,768 – 32,767 (inclusive)
  • byte: -128 – 127 (inclusive)
  • float: decimal value
  • double: decimal value
  • long: -263 – 263-1
  • boolean: true or false values
  • char: Unicode characters – ‘\u0000’ to ‘\uffff’ or 0 – 65,535 (inclusive)

Literals

Primitive data types are not objects instantiated from classes. You do not create a new one with the new keyword. Instead, you write the literal values of the data type when declaring and initilaizing the variables. For instance:

public static void main(String[]args) {
    double balance = 0.00;
    char grade = 'B';

Note: You need to use single quotes in the initialization of a Unicode character with the char data type.

Thoughts

Java primitive data types are different than JavaScript data types. I will post more on JavaScript data types soon.


  1. For instance, you cannot write String int = "Integer"; which is a convulted example but it stresses the point I’m trying to make. 

The Danger of Type Coercion in JavaScript

What is Type Coercion

Type coercion is essentially implicitly or explicitly changing the data type in JavaScript.

You can do this in a couple of ways but first, let’s take a look at some ways the JavaScript engine tries to coerce types.

Operator Precedence

Knowing operator precedence is a must when working with any programming language. You can check out the MDN for information about operator precedence.

The operators or operator functions we are going to use in these examples are < > + - * / == and ===.

These operators are read from left-to-right in the JavaScript engine. The assignment operator = is read from right-to-left.

Take a look at this code:

var coerce = 1 < 2 < 3 < 4;
console.log(coerce);

Because we are using comparison operators, the console will return a Boolean value. In this case, when the code is run in the console, it returns true, like normal humans would assume.

"True"

But look at this code:

var coerce = 4 > 3 > 2 > 1;
console.log(coerce);

This is just reversing the order of the numbers and the comparison operators. Normally we’d assume this to be true. But check out the console:

"False"

It returns false. Why? It’s coercion.

When the JavaScript engine computates this code, remember, it will read it from left-to-right.

In JavaScript, true and false have values, where true coerces to 1 and false coerces to 0.

4 > 3 returns true. Now, JavaScript reads the next operation as 1 > 2 which is obviously going to return false. We then have false > 1 or 0 > 1 which is false.

Coercion with Equality Operators

Equality operators are the equality == and strict equality === operators. When we use the plain equality operator, we can coerce a string into a number, a number into a Boolean, etc. Take a look at this code:

1 == "1";

Here we are saying the data type number is equal to the data type string which isn’t correct. But because we are using the “non-strict” equality operator, it coerces to true as we can see in the console:

"Equality"

You can assume that strict equality, then, would yeild false if we were to enter this into the console:

1 === "1";

"Strict_equality"

Thoughts

There are reasons to use coercion but typically it’s bad practice. Apparently some ES6 syntax takes some of the pain of coercion away, but as you can see, you could very well end up with hard to identify bugs in your code so it’s best to use strict equality when you are comparing something and consider operator precedence when using comparison operators.

Objects and JSON

What are JavaScript Objects?

When thinking about JavaScript objects, it is important to think about them in terms of real life objects. For instance, you have a cup, which is an object. The object has some properties: it is white, it has some text, it is holds 12 oz, it is used for coffee, etc.

Now that we have a real life model of what a JavaScript object is like, we can begin to think about how to translate that into working code.

How to Create an Object in JavaScript

Basically, the syntax will look like this:

objectName.propertyName

Let’s take a look at some simple examples of what are called object literals.

Object Literal Syntax

An object literal represents a value that you literally add to your script. It has a fixed value.

Here is the syntax of an object literal:

var obj = {
prop1: "string",
prop2: 2,
prop3: false
};

We assign the object literal to a variable obj. The following are what we call name/value pairs or key/value pairs where name or key is a property of the object and value is the value of that property.

Object Constructors

Another way to write an object in JavaScript is to create an object constructor. You create an object constructor with the new keyword.

var cats = new Cat();
cats.color = "Calico";
cats.gender = "male";
cats.age = 2;

We add properties to the Cat constructor through dot notation and adding a value, much like before:

Accessing Properties

You can access properties in an object with dot or bracket notation. For instance:

obj.prop ="value"
obj[prop] = "value"

If we take a look at our Cat constructor, we can access its age by using either dot or bracket notation:

var atticus = cats["age"];
var felix = cats.age;

This will return the value 2 for atticus and felix.

JSON

JSON stands for JavaScript Object Notation. It is used to serialize objects, arrays, strings and other data structures and literals.

JavaScript objects and JSON have a similar syntaxt but there are distinct differences.

JSON syntax:

{
  employees:
   [
     { "name" : "John"},
     {"age": "40"},
     {"employeeID": "347642"}
   ]
}

Looks similar but it isn’t. It is a simpler way to exchange data. Previously XML was used to store and exchange serialized data but this is far simpler and is the most widely adopted way to do this.

Conclusion

There is so much more to get into with JavaScript Objects. As I get to know more I will post it. Soon, I’ll go over prototypal inheritance, this, and more.