Skip to main content

Posts

How to solve print_bits on the 42 Exam

How to solve print_bits on the 42 Exam This is a walkthrough of how to do the print_bits assignment for the 42 exam. Assignment name : print_bits Expected files : print_bits.c Allowed functions: write -------------------------------------------------------------------------------- Write a function that takes a byte, and prints it in binary WITHOUT A NEWLINE AT THE END. Your function must be declared as follows: void print_bits(unsigned char octet); Example, if you pass 2 to print_bits, it will print "00000010" 1.) Make sure you have a good understanding of bits and bytes with the video above. 2.) Then you need to understand bit shifting. It’s a simple concept and Jamie Dawson has a great short tutorial on it here: Basic Bit Shifting Guide 3.) Understanding Bitwise Operators: I found the Swift guide on bitwise operators to be the best. https://docs.swift.org/swift-book/LanguageGuide/AdvancedOperators.html 4.) Solving Print Bits // solu
Recent posts

Preparing for the 42 Piscine

You can come to the 42 Piscine with no programming experience but if you would like something to study ahead of time here are my 2 suggestions. All this content is free 1.) Learning how to learn on Coursera. This will help you develop the good study habits you will need during the piscine.  https://www.coursera.org/learn/learning-how-to-learn 2.) C Programming Tutorials by Caleb Curry I haven't used this series myself but I have had it recommended a lot, many people have told me it helped them during the piscine so if you'd like to try your hand at C before the piscine you can follow along with these tutorials. https://www.youtube.com/watch?v=CPjZKsUYSXg&list=PL_c9BZzLwBRKKqOc9TJz1pP0ASrxLMtp2 3.)  Khan Academy Brush up on your math skills fore free with Khan Academy. They have both the instructions as well as exercises for practice. Mostly you'll be working with more basic arithmetic for the piscine, but you'll have a few exercises that require more math

Resources for getting a job as a software developer.

Preparation 0.) Elevate Code Interview Prep + Job Tracker Sheet I've created a google sheet that is great for job hunting. Track data about which jobs you've applied for and fill out the common questions with your answers so you don't have to think about what to say during the interview. https://docs.google.com/spreadsheets/d/1cVSuABWR1dwaF5j4AZ46grS9ggl37NaBY5X1bK2ktt0/edit?usp=sharing  1.) Github Git is the most widely used source control. Showing that you know how to use it and having a portfolio of code that employers can look at can give your career a boost. 2.) Leetcode Great for practicing in a style very similar to interviews, plus the discussion forums can show you a better way to solve things. There's a lot of great tutorials here as well. I highly suggest also posting your answers in a repo on Github. Don't try to memorize problems, but use it as a way to test your knowledge of applying the fundamentals. 3.) HackerRank Similar to Leetcode, bu

How to Tweet from the Command Line on Mac

To post to twitter from the command line as of Oct 8, 2018. (Twitter is always changing though.) Homebrew  is a package manager for Mac. You can use it to download and install things. Oysttyer  is a CLI (command line interface) for Twitter. 1.) Install Homebrew, a package manager for Mac. Copy and paste the following to install brew. More information about brew here  https://brew.sh/ mkdir $HOME/.brew && curl -fsSL https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C $HOME/.brew mkdir -p /tmp/.$(whoami)-brew-locks mkdir -p $HOME/.brew/var/homebrew ln -s /tmp/.$(whoami)-brew-locks $HOME/.brew/var/homebrew/locks export PATH="$HOME/.brew/bin:$PATH" brew update && brew upgrade 1b.) Afterwards make sure you add the following lines to your .zshrc. mkdir -p /tmp/.$(whoami)-brew-locks export PATH="$HOME/.brew/bin:$PATH" The  ~/.zshrc  doesn’t exist by default in Mac OS X so you may need to create it. The ~/ translates to you

What is a Pointer in C?

Create a variable Let's create a variable and give it a value of 3. int a; a = 3 ; Variable  a 's info Name a Value 3 Data Type The data type  of a variable tells you what kind of data it will hold. We can see in the code above that variable a is an int. int = holds an integer (aka a whole number) char = holds a single character pointer = holds a memory address Variable  a 's info Name a Data Type int Value 3 Memory Address The  a  variable is stored somewhere in your computer's memory. Just like humans have an address, variables have an address too. ( 0x00008130 is just an example address, your variable will probably have a different address) Pointers A pointer holds this memory address-- so basically it POINTS to where a variable is located. Let's create a pointer that will point to where our a variable is located. To create a pointer, we need the data type of the variable we will be

What tools do software developers use? (My Current Setup - Jan 2016 Edition)

What tools a developer will use will greatly vary based on what kind of projects they do. With that said, many new software developers have asked me about my setup so they could have an example. So here's what I'm currently using.      Main Work       Visual Studio Professional 2015  - This is the main area where you write your code. SQL Server Management Studio - For working with the database.       Comparison Tools       I use Araxis for comparing code , Redgate for comparing databases . Araxis Merge : My current favorite merge/diff utility. I've tried quite a few. Overall the UI is much more pleasant and can display more data at a time. It's not cheap, but I tried out just about every free or cheap merge/diff utility and nothing came close to the 1-click merging abilities of Araxis. A good diff/merge utility is priceless and can save you a lot of time, so take the time to learn it well. Redgate Tools   - I use their database tools to compare and map out

CodeCademy Explaination -- Javascript Search Text For Your Name 5/7

First, don't feel bad, this lesson's instructions are kind of confusing. You can skip to what you need if you want. 4 Posts: 1.) Explaining For Loops 2.) Exercise 5/7's if statement 3.) Exercise 5/7's inner loop 4.) Exercise 5/7's push statement 1.)  First you need to understand how  for loops  work. For loops are really useful for doing something over and over.  Example: For every horse in the barn, tell me the horse's name and it's age.  You'll be going to a horse over and over again to get it's name and age. But computers are stupid so you have to be reallyyyy specific about it, like this: For ( every horse in the barn starting at the one in the first stall; until you get to the 12th stall; go to the next stall) { This is what I want you to do at every stall. Get it's name and age.} Now for the computer to understand us we have to speak Javascript to it because it doesn't know English. In Javascript, that's a for loop