Now Playing Tracks

What Is Clean Code?

Since I began programming, I’ve always considered a program to be extremely similar to a math problem. You start off with a little information/idea, work hard towards your solution, and then get your end result. What happens in between the idea and finished product shouldn’t matter, “as long as it works”. The notion of such a simple process was one of the worst mentalities that ever crossed my mind. There are lots of things to be accounted for during the formulation of the end result in programming, similar to math.

How can one person’s code be better than someone else’s?

The distinction between a good mathematician and a bad one is very similar to the test you put a programmer through to see his/her skills. The end product is obviously a huge portion of computer programming, but there are other factors that determine whether your code is beautiful and readable comparable to another programmers’ work.

Some factors I take into account to make my code organized and readable:

Readability

  • Can someone look at your code and understand what’s going on?
    Or is it a cluster of equations with no specific order? 
  • Ask a friend to read over what you’ve written. If he/she can’t
    understand the processes and the functions, consider adding
    comments or having better variable names. 

Indentation

  • Though this may fall under readability, I feel this is something that needs to be pointed out. Sometimes, order and placement of code may not fully matter (in terms of readability), but the way you’re indenting your code is critical for it’s organization.
  • If your code looks like an essay, consider indenting; Indentation provides an actual outlook on how processes are being run in the program. 
  • Example of good indentation:image
  • Example of bad indentation: image

Performance

  • Is your code working or is there a bug every time you move your mouse? Make your code as simple as possible for the purpose of keeping bugs out and for keeping functions working.
  • Is it simplistic? Some base performance on the amount of lines written for the program. If you can write your program in a minimal amount of lines, you can code well-performed code.

Variable names 

  • If you’re still using variable names like ‘x’ and ‘a’, you need to learn to be more descriptive. Being illustrative with your variable names will help you use them later, and not initializing more variables with the same algorithm.

If you’re a novice programmer, consider these factors as you write your Hello Worlds. Though they may seem insignificant, once you’re writing thousands of lines of code, creating clean code is needed for your program to work well. If you’ve ever wondered what clean code consists of, I hope I answered your question. 

Elon Musk: A Self-Made Entrepreneur

Recently, I decided to write down a few paragraphs about my favorite entrepreneur. Elon Musk is the founder of Zip2, PayPal, Tesla, and SpaceX. The reason I chose Elon Musk to be my number one contender is: he’s willing to risk everything for the progress of the company and the beauty of the product. He’s built companies with all the money in his bank account, and didn’t expect success or profit.

His companies have disrupted the industries that they entered and have changed the world in a different aspect every single time.

Lessons Learned at Startup School

In my most recent post on the Huffington Post, I discuss my experience at Startup School, an event sponsored by Stanford BASES and Y Combinator.

At Startup School, tech startup founders came and spoke about how they built their business and gave tips to attendees about the lessons they learned along the way. There were countless things to learn from the experienced speakers and the hard-working guests of Startup School as a teenager.

16.

Today’s my birthday. Every year older I get, I will try to make a list of (5) goals I want to achieve before my next birthday. Here’s my list until September 23, 2013.

I was more involved with the tech community than ever before, at the age of 15. Here are a few accomplishments since my last birthday:

  • Got an internship at DoSomething.org.
  • Got Straight A’s. Woo!
  • Started this blog.
  • Took filmmaking courses at the local community college.
  • Started going to tech meetups, shows, and classes in New York City.

Here are my top 5 goals until I turn 17.

  • Get my permit.
  • Make a feature-length film in my free time.
  • Work on an app/site that requires over 72 hours of work.
  • Get another internship, preferably as an iOS developer.
  • Travel (more) domestically.

Go out and achieve your goals.

The Chronicles of my Internship at DoSomething

I started counting down the days until my internship at DoSomething.org from the day the summer started. As soon as my internship began, I fell in love with the workplace. We rode scooters around the office (freakishly addictive), had meeting rooms named after themes from superhero movies (Xavier School from X-men), and we worked with extraordinary people with unbelievable backgrounds. In summary, Fridays were the dreaded days. 

Read More

To Tumblr, Love Pixel Union