Posted 7 months ago

It’s been quite a while — and lots of changes. Good changes.

I’ll be back later to update since Alan and Kitty Cat are coming over.

Posted 10 months ago
Posted 10 months ago

Thank you.

I received a message last night from an executive board member of a MAUVSA member school. This is what it said…

 

"Hey Tuan! How’ve you been?? I’m sorry this is prob really random but I just wanted to say thank you Recently, my life has been starting to get crazy busy and to a point where I want to just give up sometimes. I’ve seriously never been so swamped in my life! But every time I get stressed out or want to quit, for some reason the first person I think of is you. I think about how dedicated you are to MAUVSA and everything else you have going on for you right now. I think about how you carry yourself in such a respective manner and how you are such a great role model for the Vietnamese community. I’m so blessed to have been given the opportunity to get to know you bc you’re having such a positive impact on my life. You are constant reminder to me that I should be proud to be a Vietnamese American. You are such an amazing role model to me and I have mad respect for you. No lie, everyone who has met you before would probably agree that you are one in a million! Thanks for being you Don’t ever change, stay you and please continue to inspire others the way you inspire me to keep pushing forward”

 

This totally made my day, month, year. It’s individuals like that make me realize what is do is all worth it. Thank you thank you thank you. 

Posted 10 months ago

BinarySkipper: fw: Stephen's email on sharing neat tools

binaryskipper:

preface to this post
This is a email I just spent a bit of my last waking minutes today sending out to the most recent batch of phase 1 students at DBC SF. I didn’t edit any of it so don’t sue me for grammer or language. :)

I can’t reiterate sharing our tools enough as we wouldn’t…

Thank you, STEFFFEENNNN <3

Posted 10 months ago

vagabondmaurice:

Rest in Paradise: John Vietnam | JVN 

Probably one of the most gorgeous things to grace my tumblr. Spent my weekend at the University of Madison-Wisconsin honoring/celebrating the life of a fallen friend. I spent a lot of time at this momentum, just kind of standing there and staring off at the lake.

It doesn’t feel like it’s been a year.

But there was a lot of love there during the events in honor of the brother John, which is always lovely. Word.

This is how we chill from 93’ till.

Posted 10 months ago

Sunday was Pair Programming Day

Check-in 4:37am

Great pair session with Stephen. Learned a lot about iterating over Hashes, refactoring, and some great debugging methods. It’s been about a week since I really dove into Ruby, but its coming together nicely. Later today, 

Things to take out of this pair programming session —

-Awesome use of hashes

-Write pseudo code before hacking.

-Develop one pattern and replicate it OR find a sweet loop to iterate over a hash/array

-never try to print something at the end of the method or it’ll return “nil” 

-.class will show you what kind of class an object is 

-go crazy with debugging — use puts statements, write test scripts. 

Things I need to do after I wake up and eat breakfast:

-Refactor the Roman numerals app

-Review OOP1 and OOP2, review the cash register application, and go over objects in Socrates 

-Finish reading Learning to Program 

-Finish my application to Code Fellows

-Start studying Rails 

Posted 11 months ago

Time for ‘Class’

Its 1:23am. I’m up right now determined to finish all of this section of Object Oriented Programming 1 in Codecademy.com. I need to get all of this down so when I do get into a bootcamp, I’ll be ready (really really excites me when I think about it) Currently learning about classes. Pretty cool stuff!

Class - a way of organizing and producing objects with similar attributes and methods.

How to define a class

as a standard, classes are defined like so —

class ClassName <—-notice the caps

end

Instance variable

signified by @name which means the variable is attached to the instance of the class

 

Scoping is super important when it comes to classes as you can determine what variables are seen by the program. There are different types of variables —

  • global variables - can be used everywhere
  • local variables - only available to certain methods
  • class variables - only available to certain classes
  • instance variables - only available to certain instances of classes

 

Posted 11 months ago

For the novice devs (aka me)

My good friend Stephen recommended that I pick up Learn How to Program by Chris Pine. I must say…”wow”…what an easy read. If you are looking to get into programming, Chris does such a good job of explaining Ruby concepts. 

Some things I need to remind myself of:

DRY programming

Don’t. Repeat. Yourself.  

Just don’t do it!

Something Chris brought up to help with the flow of programming was 1) use # to comment on what you are looking to do with certain parts of code

2) for logical statements use your else, elsif and ends to maintain order, cleanliness, and most of all to test if certain parts of your program are working. 

Stuff I reviewed today:

.map/.collect method — gathers all strings from an array

Stuff I learned today:

lambdas — lamdas are very similar to procs. Heres the syntax —

lambda { block } 

Notes on lambdas vs. procs:

A lambda checks the number of arguments passed to it, while a proc does not. This means that a lambda will throw an error if you pass it the wrong number of arguments, whereas a proc will ignore unexpected arguments and assign nil to any that are missing.

Second, when a lambda returns, it passes control back to the calling method; when a proc returns, it does so immediately, without going back to the calling method.

Blocks, Procs, Lambdas aka THE TRIPLE THREAT

  1. A block is just a bit of code betweendo..end or {}. It’s not an object on its own, but it can be passed to methods like .each or .select.
  2. A proc is a saved block we can use over and over.
  3. A lambda is just like a proc, only it cares about the number of arguments it gets and it returns to its calling method rather than returning immediately.
Posted 11 months ago

Refactor. Me.

What is refactoring? Its taking lines of code and making it more efficient. Refactoring is cool because it really allows you to play around with your syntax to see what works and what doesn’t. Its definitely a great way to keep things organized, however, it can be a little hard to read depending on what you are changing up. Some things just aren’t mean to be…ch…refactored. 

Currently looking at:

.collect method — iterate it over an array and it will collect all the variables within that array and return a copy of it

note: adding ! in Ruby means “This could do something dangerous with the code” So if we were to run array.collect!, it would mutate that current array rather than create a copy of it. Very. interesting. 

block, yield - you are able to run a method, reference a yield to execute code beyond the method, and then come back to the method. Also very interesting concept here. 

Proc method — allows you to keep create a copy of a block. 

Proc syntax looks like this —

name = Proc.new { |x| do stuff }

calling a Proc, example: 

ints = floats.collect(&round_down) — the & means to concert the Proc into a block

It’s a little confusing, I know but I think in time I will start understanding this method. 

Added Notes (Taken from Codecademy.com)

  1. -Procs are full-fledged objects, so they have all the powers and abilities of objects. (Blocks do not.)
  2. -Unlike blocks, procs can be called over and over without rewriting them. This prevents you from having to retype the contents of your block every time you need to execute a particular bit of code.

Pretty strong stuff! Procs are pretty cool! Easy to use, easy to call. 

THERES AN EASIER WAY TO CALL PROCS!

*drum roll*

the .call method —- behold this example:

test = Proc.new { # does something } test.call # does that something!

to  be continued…

Posted 11 months ago

Cases

Currently G Hangingout with Tony V. 

case statements —> another way to write if statements 

ternary operators

.upto and .downto

instead of using .push on an array, you can use concatenation operator aka “the shovel” represented by « 

Shoot, I should probably review a little before typing some more. It wouldn’t be good to look back here as a reference only to use the wrong material.