Skip to content
View RobotsBuildingEducation's full-sized avatar

Block or report RobotsBuildingEducation

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Welcome to Github!

Github is a platform that let's software developers collaborate with code. Think of it like Google Docs but for software engineers. We'll learn more about using Git and Github another time but for now this serves as a warm welcome to the world of software construction.

Advice

It's important to remember this as a beginner:

  1. Building things with software is mostly about organizing information rather than being good at math. Programming languages use logic and computation to express ideas instead of equations and algebra.

  2. Like the English language, you can express the same things in many different ways.

  3. When something challenges you, fail faster and break the problem into more understandable steps.

Exposure

The idea here is to expose you to concepts before you start to answer questions about it in the app so you aren't intimidated by it later. Don't worry about not understanding everything. In fact, try your best to make sense out of it at a glance or use AI to your advantage to create an understanding.

Code

Let's observe these lists. We can see that:

  • my_custom_data && my_custom_list are equivalent.
  • data_set && data_object are also fundamentally equivalent.
let my_custom_data = [
  1,2,3,'a','b','c',null,false
]
const my_custom_list = new Array(
  1,2,3,'a','b','c', null, false
)
my_custom_data.push('new data')
my_custom_list.push('new data')

let data_set = {
  intro: "Welcome",
  title: "Chapter 1",
  is_live: true
}
data_set.page = 4
data_set['book'] = 'Coding'

let data_object = new Object()
data_object.intro = 'Welcome'
data_object.title = 'Chapter 1'
data_object.is_live = true
data_object.page = 4
data_object['book'] = 'Coding'

Additionally, in the example above, we're exposed to variable definitions, data types, arrays, functions and objects. A lot of the software that you write likely operates on those concepts under the hood. This is the way [] and new Array can create the same data - it translates the same way when it comes to turning your code into signals that can be sent across the internet.

Now in the example below, we take a look at creating our own custom objects. We create our own custom object, along with an interface of functions. Generally when it comes to data, you're able to create, retrieve, update or delete it in some form or another.

class House {
  house_paint = null

  constructor(paint){
    this.house_paint = paint
  }

  getPaint(){
    return this.house_paint
  }

  setPaint(paint) = (paint) => {
    this.house_paint = paint
  }

  deletePaint = () => {
    this.house_paint = null
  }
}

let first_home = new House(
  "pink"
)

let next_home = new House(
  "blue"
)

// returns the value "pink"
let first_paint =
  first_house.getPaint()

// returns the value "blue"
let next_paint =
  next_home.house_paint

// still returns the value 'blue'
next_paint =
  next_home['house_paint'] 

So that's creating data and working with data. You'll find that you can usually combine ideas depending on what you need to create. For example, the above component can also be written the following way:

function createHouse(paint = null) {
  return {
    house_paint: paint,

    getPaint() {
      return this.house_paint;
    },

    setPaint(paint) {
      this.house_paint = paint;
    },

    deletePaint() {
      this.house_paint = null;
    },
  };
}

//what is the value of the result?
const myHouse = createHouse('blue');
let paint = myHouse.house_paint;

myHouse.house_paint = 'red'; 
paint = myHouse.getPaint()

myHouse.setPaint('green'); 
paint = myHouse.house_paint

myHouse.deletePaint(); 

let result = myHouse['house_paint']

Finally, we combine this to work with some code that renders the following screen

const CelebrationMessage = ({
  name
}) => {
  const styling_data = {
    textAlign: 'center'
  }
  
  return (
    <div
      style={
        styling_data
      }
    >
      {name}
    </div>
  )
}

const App = () => {
  return (
    <section
      style={{
        border: '3px solid black'
      }}
    >
      <header>
        <h2>Good job!</h2>
      </header>
      
      <CelebrationMessage
        name="You created a small app!"
      />
     </section>
  )
}
image

And that's all! In the last example, we've used a library called React, which gives us access to special functions that are specialized for rendering elements on a screen. But it follows the same thought process as the stuff before it.

Conclusion

Remember that failing faster is in your best interest when learning new skills with software. This one pager document will be available inside of the app. There are also many other features to help your journey along the way, but I'll leave that to your exploration of the platform and everything it has to offer.

Stay focused and best of luck with the rest!

Pinned Loading

  1. embedded-rox embedded-rox Public

    TypeScript

  2. embedded-sunset embedded-sunset Public

    HTML

  3. scholarshipment scholarshipment Public

    scholarship network

    JavaScript 1

  4. LaFAFSA LaFAFSA Public

    Fafsa tooling

    JavaScript

  5. Say-Less Say-Less Public

    A demo startup

    JavaScript 1

  6. Zap Zap Public

    Zapping with bitcoin

    JavaScript 1