Friday, December 18, 2015

Learning to Program

It's pretty often that I get asked about how I learned to program, so I thought I'd write a quick post about it (Update: it's not quick).

My audience is mostly people who are interested in becoming professional programmers, but also includes anyone interested in developing at all. For any developers reading this, please critique anything I say! Please! I know I'm still relatively young in the field, and I'd love input. I'll be transparent about my earnings, so you can get a feel for what a web developer in Salt Lake County, Utah might make.

Short Version

I goofed around with programming languages during my teen years, seriously studied PHP for a few months the fall after graduating high school, then got my first real job the following spring making $14/hour.

The Long Story

Background

I've been coding professionally off and on for about 9 years now. About 5.5 years work experience. I mostly do PHP, MySQL, and Javascript, but every web developer also needs to know some HTML and CSS.

High School / Beginnings

My very, very first programming experience would've been one of four things, that all occurred during high school. I'm not sure which happened first, so I'll just list all three!

  • Geocities. I lied, this one was definitely the first of the three. Also, it's not technically programming, but it's a good precursor. If you're not familiar with Geocities, it was a free service by Yahoo (I think?) that allowed you to drag and drop elements so you could build a webpage. Mine was incredibly ugly, as most websites back then were. It's actually been archived, if you're interested in seeing it :)
  • TI-83. During my math class my senior year, I looked at the code for some programs (games) on my calculator, and I copied bits and pieces of code around until I understood what they were doing. Doing that, I was able to program a simple game. Basically a ball ("O") would fall form the top of the screen, and you have to move your cup ("U") to catch it. If you missed, the game was over and it showed your score. It also logged a high score. In retrospect, I'm amazed I did this without Google haha (that's only half a joke).
  • IPB forums. This also was hardly programming, but important to where I am now. Invision Power Boards are built on PHP, the main language I work in today. I managed a forum that was mostly frequented by my high school buddies, but we built a memorable, if small community. The only "programming" aspect was copying forum mods from websites into the existing code. Many people who ran IPB forums did this same thing, but looking back at it, it was extremely hackish. You would find a certain bit of code, and paste another bit of code directly after that. Obviously, if you used more than one mod on your forum, it was likely they'd break each other.
  • I also took a Java class in high school, but I have so few memories of that class (except doing nothing in the class) that it's barely worth mentioning. My teacher was cool though :)

Between those four experiences, I picked up some HTML, a little TI-BASIC, and a very small amount of PHP and Java. Nothing worth anything useful, really, but enough to pique my interest.

College, Java, PHP, and First "Jobs"

After high school, I went to a community college where one of my classes was Java. It was a good class where I learned a lot, and surprisingly still remember bits and pieces more than nine years later.

While I was studying Java in class, I started practicing PHP on my own time. If I recall correctly, I had a couple friend who recommended it. And the community has always been so big (lots of online tutorials) and the language has always been so simple, that's it's an easy one to pick up. I mostly learned by looking at examples on w3schools.com and writing code in Notepad. I believe I purchased a server from GoDaddy for about $3/month.

I looked into programming, because like every teenager, I wanted to make video games. I quickly learned that PHP is not a good language for video games. Nowadays it can serve as a backend for a web-based game, but still not ideal for games xD

Within a month or two, I thought I could conquer the world. In retrospect... what did I even know? Haha I can't remember much. But it felt cool! I fell in love with web development because it was so easy to write some code and then turn around and show it to friends.

It was probably around this time that I took my first freelance job. I took a job from a guy I found on Craigslist. Probably charged like $150 (which I would never do now). Probably wrote some terrible code. But hey, I got paid, and I don't regret my decision to be adventurous.

I also took a part-time job from my brother-in-law, working on his website and helping him run his car lot. Again, probably wrote terrible code, but I was getting paid, so hey. Around this time, I did some programming work for my brother and dad. I specifically remember being really lazy and tired (I'd fall asleep at work sometimes haha!) which just makes me feel really grateful they were paying me at all. At each of those jobs, I was probably making somewhere around $5 and $8 an hour.

First Real Job

The best part of all of this was that now I had a resume, even if it wasn't anything special. I had three or four items I could list, and say "hey! people have actually paid me to program before, you should too!" I think this was extremely helpful in my early days.

What I'd call my first real job was what I got in March of 2007, at a place called Heritage Web Solutions, I believe it was my first full-time programming job. They happen to be out of business now because of tax fraud (hah!) but again, I'm grateful for the work experience I could put on my resume.

When I interviewed there, they asked me how I'd rank my PHP skills on a 1-10 scale. I said seven. SEVEN. I don't know if I'd call myself a seven even today. I was a cocky little sucker, but again, it probably served me well.

They were what many refer to as a "chop shop." It's a programming place where you have a bunch of developers (we had about 20 PHP guys, and probably 50 HTML/CSS guys), clients come to the business and ask for help making a website, and the company produces a website for very cheap. Usually low quality too.

I earned $14/hour, and I thought I was rolling in the dough. I started spending money like mad, because never in my life had I had access to so much. And to be fair, less than a year out of high school, I was making more money than many middle school and high school teachers. Which is a real shame for them, but a nicety of the programming world. Take that how you will.

During that time, I spent a lot of my free time coding too. I learned about rainbow tables, so I started making an MD5 rainbow table, just for kicks. I wrote a few simple chat programs, and a bunch of my friends actually used them, which was encouraging. The internet was still young back in 2007. Think pre-Facebook being popular; I signed up for Facebook in 2007, and almost none of my friends had it. So developing a simple chat program that used AJAX (this means it didn't need to refresh the page) was actually pretty cool for the time. I also tried to quench my desire for making games by making a Javascript/PHP game, which creatively enough, I called GAME. It's still up and functional, if not popular, to this day!

So in short, I was passionate. That was probably one of the biggest strengths I had in my early development days. Honestly, I was lazy, and I didn't study standards or proper techniques much, but I was passionate. When I started that job, my code was terrible. I remember doing things that now make me cringe. But there's something to be said for learning to do something while being paid to do it. I got much better very quickly. I still wasn't very good when I quit nine/ten months later, but I was definitely better.

The Long Job and School

After quitting my job and serving an LDS mission for two years, in 2010 I jumped right back into the field. I got a job at another "chop shop," but this one was much smaller, slower-paced, and we wrote better code. Despite only having about one year of real-world programming experience, I quickly became the lead developer at this new job. I was also the only in-house developers, but we had 3-5 outsourced developers that I'd often play as a minor management role. Again, not knowing the value of this, I feel like I really lucked out in that regard.

I was at this job for the next 3.5 years. My boss was cool enough to let me telecommute, so I could work while I lived with my parents, and I could work while I was going to school and living in Ephraim, Utah. Fantastic combination for that time of my life. Again, mostly unintentional, and I feel like I was really lucky. I was able to pay for all my college tuition and board while working and remain debt-free while getting my associates degree.

Quick note: I didn't study web development in college. I took one or two relative classes, but honestly I was way ahead of what they were teaching. Work experience is great that way. Kinda like being thrown into the deep end of the pool to learn to swim.

Also, colleges tend to be behind the curve when it comes to programming. And how wouldn't they be? Businesses have to keep up with technology if they want to thrive. Professors on the other hand typically want to teach what they learned, whether that be 5, 10, 30, 50 years ago. Unfortunately that doesn't work in the IT world. To be fair, not all classes are this way, but many are. On th

Being at one job for a long time had pros and cons. I learned a lot in that time, but I also got too comfortable doing the same stuff every day. One of the best things that happened to me at that job was when we hired another, more experienced developer who taught me a thing or two. This is when I really started picking up OOP, MVC, and more specifically, CakePHP. All good stuff.

By the time I left this job, I was making about $20/hour.

Hop, Skip, and Jump to Now

I don't want to divert too much from the subject matter (learning to program), so let's wrap this up.

The last few years, I've had a few different jobs, all of which involved a lot more OOP than the other jobs I've talked about. Which is great! OOP is wonderful, and I'm happy to be getting better at it. I think there's also a big salary jump when you move from procedural (non-OOP) to OOP. With all these jobs I've earned $30-$33/hour.

Other Thoughts and Conclusion

I think I'm a little behind the expected salary for my experience, but I'm okay with that for now. I more or less took the last year off from the work world, so I'm willing to take a pay cut to ease myself back into the workforce. A few programmers I know with similar experience are making $40-60/hour.

As a rule of thumb, you should charge twice your full-time pay when doing freelance work. I charge $60/hour at the moment. I feel good about this rate, because freelance projects are usually pretty straightforward, I know the code in and out, I'm very focused while working in short ~2 hour bursts, and overall my time is extremely productive. 

If you think you're interested in developing, it is undoubtedly a good field. I've done research comparing different careers, and the pay is excellent, especially based on pay per years of experience, and pay per education level (most jobs don't care if you have a degree as long as you can do the job). At 27, I'm making more on my own than the average American household. Most jobs have salary with benefits, and the job growth for the industry and huge and likely will not decrease anytime soon. People are always needing more computer and more systems and more programming and more developing.

If you want to program games, go with C++. It's easily the most popular language for games. 

If you want to make more money than I do, go with Java, C++, or an obscure language that other programmers don't want to touch. The danger, of course, with that last option is that your skills won't transfer to other jobs as easily.

When it comes to programming, web developers (like myself) typically make less than software engineers. Do your research first by looking at pay rates of different languages. 

New languages are tricky, because they often earn a lot, but often phase out quickly too. A few years ago there was a lot of excitement about Ruby / Ruby on Rails, but it's really died down now as the honeymoon phase has worn off.

PHP is an easy language to learn, but doesn't necessarily encourage good practices. You can learn those regardless, but it's something to keep in mind.

I wish I would've been more serious about learning good practices from the beginning. This is one pro of going to school to learn programming, I've heard they really drive good practice. But you can also do that on your own. Just have to be conscious and passionate about it.

Use Git (or similar, but not SVN). Just do it. It's great practice, and will save you many headaches.

I often say that 90% of programming is Google, so get good at googling. That might sound like a joke, but really, learning how to ask Google the write questions is important. It's also important to get in the habit of saying "I'm not sure I know how to do this," or "There might be a better way to do this," or "It's possible someone has written some code to do what I'm trying to do" or even," I know how to do this, but I wonder how other people do it," and then Google it quickly and at least see what's out there. You will learn so much this way.

On that same note, I think the best developers are open-minded developers. Always be aware that you can improve, and be passionate about doing so. You will never be a perfect developer because things change so quickly.

Thanks for reading, feel free to comment with any questions, thoughts, or criticism!

Tuesday, October 27, 2015

Asia Trip, part 1: Flying (Cheaply)

<3 My Asia Trip <3

I've been meaning to start a short series about my trip to Asia this year. In short, I spent five months (Feb to Jul) backpacking across Asia, visiting a total of five countries. It was easily one of the best experiences of my life.

Concerning Airplanes

I often get asked about how I afforded to fly so far and so frequently. And as silly as this sounds, it's also a topic I get very excited about. I suppose it's because I love travel. I love seeing new things. I love connecting with people I just met. I love talking to people who come from backgrounds that are considerably different from my own.

But I think when people dream about traveling internationally, there are a few "unknowns" involved. And people are naturally scared of the unknown. How will I communicate with people if I don't speak their language? How do I know where to stay? How can I be safe? And in our case, How can I afford to fly there and back?

I'd love if everyone had the opportunity to travel more. Especially internationally. For that reason, I'd love to help clear up some apprehensions and anxiety people might have about traveling internationally.

A couple caveats. Flying, unsurprisingly, is not cheap. It will require a decent amount of savings. The good news is that it's cheaper than many people think. Also keep in mind that I was a backpacker. I traveled based on this logic: the less I spend each day while traveling, the more days I can spend traveling. While traveling, I tend to value inexpensive experiences just as much as pricier experiences. For that reason, if you usually fly anything more fancy than economy, the things I say here probably won't apply to you.

A Few Numbers

My first international trip was three years ago. I went to Japan for a month. The trip sparked my love for travel. Experiencing a new foreign culture definitely changed my life. One of the best parts is that the entire trip--flights, food, souvenirs, room and board--all cost about $2,000. Granted I was only paying for myself, and I was staying with a friend for free for more than half the time. But the airplane tickets, roundtrip, were only about $1050.

But wait, there's more! ;) After my first international trip I learned a few tricks. I was able to get tickets for even cheaper this time around.

To the right is a chart (or Google Doc) with all my flights over the course of my five months of traveling including details about where I was coming from, where I was going, which airline I took, and how much it cost. I listed connecting flights as $0.

The first thing I'd like to point out is that I took 11 flights (15 if you count connecting flights). The second thing is that all 11 (15) of those flights only cost a total of $2,430. That's an average of $220 ($162) apiece.

Realize that a lot of those flights were short flights. My cheapest was not international; a half-hour hop from Jeju Island, Korea, to Busan for an incredible twenty-six bucks. It was also cheap to go between Seoul and Osaka. I took advantage of that and flew back and forth a few times. Each of those flights were under $100.

But even look at the relatively expensive flights. $733 was the most costly, but it took me almost to the opposite side of the world. Bangkok, Thailand, to Salt Lake City, Utah. My second most expensive flight was my first flight, the one going the opposite direction: Salt Lake City to Taipei, Taiwan; $527.

How to Find Cheap Flights

I used to use Kayak.com and Expedia.com to get my plane tickets. I still think they're decent resources, but not the best. I only mention them because they may be worth looking into.

If you're a real bargain hunter, it's definitely worth it to research local airlines and look up flights directly through their website. Peach Airlines, for example, regularly has insanely good sales on tickets between Japan, Korea, and some nearby countries. Local airlines are often much cheaper than larger companies. You can find lists of airlines for specific countries by using Google and Wikipedia.

Overall, my go-to resources now are SkyScanner.com and Google Flights. I've found them to be good for a few reasons:
  • They each seem to be more comprehensive than other resources when it comes to searching multiple airlines at once.
  • They are both very fast at loading tons of results at once. Last time I tried Kayak, it was painfully slow in comparison.
  • This is probably the most important one: they both have powerful tools for searching a specific week or month for the cheapest available flight. Kayak has a similar tool, but it's slow, cumbersome, and hasn't given me similarly inexpensive results.
I can't stress that last point enough. And honestly, that might be a deal breaker for you depending on your travel style. Not everyone has the flexibility to schedule their traveling around cheap flights, but if you can, you can easily save hundreds of dollars per flight. I sound like I'm making a sales pitch (haha) but I'm not even exaggerating. The difference between a Saturday flight and a Tuesday flight might be two or three hundred dollars. Even for a short flight. Remember that $26 flight I mentioned earlier? Many of the alternatives were $100-200.

A Few More Tips and Some Review
  • When looking for a flight, search both SkyScanner and Google Flights. I've found no pattern that indicates one is better than the other. Just use both and choose between your options.
  • Weekend flights will almost always be more expensive than weekdays. If you're taking time off work for your trip, it may be advantageous to take days off before and after the weekend rather rather than solely before or after the weekend. For example, flying out Thursday and flying back on Tuesday will likely give you cheaper flight options than a Friday (weekend alert!) and Wednesday.
  • Certain months will almost always be more expensive than others. SkyScanner actually has a tool that will tell you which month is the least expensive of the year for your planned trip. Otherwise do a little research regarding the countries you're flying to and from. E.g., flights to and from America will be more expensive around Thanksgiving and Christmas because everyone is flying to see their families.
  • I'm sad to admit it, but some countries are simply more expensive to travel to. Japan, for example, is more expensive for me to fly to than Taiwan even though Japan is actually the closer of the two. In this case, I believe it has to do with taxes.
  • If you're really looking for a deal, look up local airlines in addition to the other resources I've listed.
  • Flexibility! If you remember one thing from this blog, remember that if you use these resources, and your travel date and time are flexible even by a few days, you can save hundreds of dollars. And more money saved means more money for future travels :)
Fin.

If you have any other tips that I didn't list, definitely let me know. I'd love to hear your input. I hope the info in this post can be helpful to you or a friend. More travel leads to more people connecting which leads to a world more understanding of itself. There's not a lot of things more beautiful than that.

Thanks for reading! 

Thursday, September 3, 2015

Moroni's Promise Video

Did I ever post this? I don't think so haha. Anyway, in Jan 2015, I made and posted this video about Moroni's Promise.  Enjoy!

Thursday, July 23, 2015

My Asia Trip Flights

I love stats! So I compiled numbers for my trip's flights.
Total trip time: 5 months, 4 days (Feb 10 - Jul 14)
Total flights: 11 (15, if connecting flights counted individually)
Countries visited: 5 (Taiwan, Macau, Japan, Korea, Thailand)
Average time between flights: 15 days
Domestic/international flights: 2/9
Total cost of flights: $2,430
Least expensive flight: $26, Jeju Island > Busan (Korea)
Most expensive flight: $733, Bangkok > Shanghai > LAX > SLC
Average flight cost: $221 ($162 if connecting flights counted individually)
Flight costs per day of travel: ~$15
Airlines used: Delta, Air Macau, HK Express, Asiana, Peach, Air Busan, EastStar Jet, Air Asia, China Eastern, Alaska

If you're very interested, here's the Google Doc.

What I learned from compiling these stats:
My flights were costing me about as much as my hostels per day. Maybe a little less.
$26 is incredibly cheap. I had forgotten how cheap that flight was!
I was flying a LOT even though I stayed in each country a long time. 15 days between flights is not much.
My Hong Kong to Osaka flight was way too expensive, though I'm not sure why. I'm guessing it's because I hadn't discovered SkyScanner yet.

Saturday, January 3, 2015

Ocarina of Time 4 Player Co-op, Part Two!

I played four-player Ocarina of Time again! ^o^

In my first post, I talked about how to install it, and why it's so great, etc. etc.

Tonight, I learned a lot more about the ins and outs of the games, and namely, how damn buggy the game is. Haha!

First, some additional setup notes for network

The setup guide I provided in the first post is good, but I forgot to talk about playing over a network! When you launch the game, it will give you the option to "Create Server" or type in an IP address and port, and host. If you're hosting, click "Create Server" and then wait for other players. As they join, they will have the option to "Start Game." Nobody, including the host, should click this until all players are in! You cant' have players joining during game, so you have to make sure everyone is in first.

...but really, just use controllers :)

Especially if you have more than two people, it's much easier to use controllers! For some reason, it seems like the bugs and general game-breakages increase exponentially with the number of computers networked into the games. So instead, if possible, I highly recommend plugging multiple controllers into one computer and going that route! Tonight we had four controllers: 2 wired Xbox controllers, 1 wireless Xbox controller (using a USB wireless Xbox receiver) and 1 Logitech USB controller. None seemed to have any issues. Configuration for each was simple.

Holy shmow this game is buggy...

There are so many bugs in this game! There may be patches/mods out there that fix some of these issues, but I don't have them. If you're aware of any, let me know! Here are some of the bugs we found and workarounds:

  • Cinematics, in general. Even short ones, like Saria running up to Link at the beginning. They will often freeze Green Link, or just crash the game entirely. If Green Link is frozen, have another player run out of the current area. When green Link is respawned, he should be able to move again.
  • Save states are your friend! Like seriously... use them all the time. Once you get the hang of how a game starts up, they will save you from game glitches exceedingly often. I also recommend using the Save As... function so you will have multiple save states backed up. Just in case.
  • Don't die. It does weird things to your Links (like making them uncontrollably walk in one direction), and in general I've found it unrecoverable 85% of the time. If you do die, load your latest save state!
  • If you can't seem to get past a glitch, skip it! The game remaps Link's Z-targeting and toggle map controls (Z and L buttons, respectively) to a function that makes him fly, and in the case of the Z button, it also makes him clip through walls. There were a few instances, cinematics mostly, that were easier to skip past than try and find how to get around the bug. For example, when The Great Deku Tree or Zelda are telling you stories that involve cinematics. Just skip that stuff! Clip through walls and people to get you where you need to go :)
  • ...but use clipping wisely. Clipping through a wall and into an endless pit is a quick way to get yourself killed and/or stuck in an endless loop of glitching. Only clip through objects when you need to, or if you're messing around for fun, make sure to use a save state first.


Holy shmow this game is fun!! <3 <3

We had an absolute blast tonight, with four people playing as "Links" (our chosen profile name). We started from the beginning of the game, we didn't use the OP debugging account (it has almost max hearts, and almost every item in the game), but we still managed to fight, fly, clip, and glitch our way to Goron City :)

I'd highly recommend this to anyone with a bit of patience, and a love for Zelda. Take a look at some highlights :)









Happy gaming! Or as Link would say... "hyah! chyah!" (multiplied by four ^o^)