This is for those of you out there who are about to start your job search and who may be worried that you can’t land a top-tier tech job without a Stanford CS degree. Someone told you that you’re not good enough to get a job at Microsoft or Facebook.
But I’m here to tell you that you can get that job. Here’s how I landed my dream job at Twitter.
Read more about my courses here to learn how I prepared.
Cracking The Coding Interview (Book Review). Control Basics Github Tutorial For Beginners - learn Github for Mac or Github for windows If. Sep 27, 2016 Introducing Cracking the Coding Interview Tutorial Series. Quantity of coding challenges is certainly important. However, one way to increase your chances of acing your interview even further is by solving the right type of interview challenges. We’ve teamed up with author Gayle Laakmann McDowell who wrote the best-selling book Cracking the.
You can read about my experiences after a year at Twitter here.
If you prefer to watch my story instead, I made a video here:
I did not graduate from an Ivy league school. I went to a community college in Idaho for two years, and then finished my CS degree at a small Catholic university.
I started learning computer science in my junior year of college, because it sounded fun to me at the time. The only thing resembling a computer I had growing up was a Chinese copycat of the Nintendo SNES. Even then, it would break every time I put a cartridge in it.
To support myself through college, I took multiple part-time jobs like cleaning floors and working stand-up concessions.
When I graduated, I didn’t have a job lined up. I applied to as many big tech companies as I could, and had the good fortune of landing a few phone interviews.
At this point, I didn’t have a single notion of what a technical screen would be like, much less how to prepare for it. I headed into these interviews thinking that the interviewer would ask me what a linked list or binary tree was.
I didn’t pass any of those interviews.
I didn’t delve too much into whether I was good. I knew that I could learn things fast. I just needed an opportunity.
As the saying goes, cast your net far and wide. So that’s what I did.
What I did next is something I’m particularly proud of. I wrote a simple Python script that scraped job listings on Craigslist with titles containing keywords from a list, and collected the emails in a spreadsheet. For the actual war story, you can read the article here.
It wasn’t the smartest solution, but people who post on Craigslist are surprisingly accurate with their titles.
Craigslist, however, didn’t like people scraping their website. To work around this, I ran my script through a VPN, and had a timer that would pause the script every few minutes or so. It wasn’t perfect, but it worked well enough.
In the end I collected about 500 emails from around San Francisco, Portland, Spokane, and Seattle. I filtered the results by how specific and recent they were, and kept improving it by adding more and more features.
As it turned out, there were a few bots in the market already that crawled Craigslist and sent out automated emails. These were mostly offshore companies that were looking to pitch their company to the US market.
One of my workarounds was that I crafted emails that used keywords from their listings in the title of my emails. I then added more details using the body of the postings to make it seem more personable. I did a quick A/B test, and the replies I received had increased quite a bit from around 2–3% to 10%.
Out of the 500 or so emails, I received about 50 replies, and landed phone screens with a small percentage of those. I stopped at 500 because I was short on time and needed to finalize a job as soon as possible. I was optimizing for results rather than reach at that point.
As luck would have it, I finally landed a job at a startup in Seattle as a junior software engineer. The startup was located in Kirkland at the time, so I had to take a 45-min bus ride to make it in time for the interview.
I then stayed there for the next 3.5 years, where I learned a great deal of stuff like Amazon AWS, EC2, DynamoDB, SQS, and Docker. I grew a lot during this period. I learned how to write modular, maintainable code. I learned how to reason about software design. And I learned how to handle people problems.
I was working next to a group of smart people who held jobs at Microsoft, Amazon, and LinkedIn, and I tried to be the “sponge” in the group. I absorbed anything and everything they threw at me. I believe this made a huge impact in my career.
During my stint at the startup, I worked almost exclusively on backend development, with some dev-ops in between. I started out writing some functions to add/modify a feature that were mostly small in scope. But it was a great opportunity to understand the codebase and get some code reviews.
A year into it, I started owning parts of the codebase, and then I was tasked with turning a set of features into a service. That was the start of the SOA phase for the startup. We started turning various components of the site into services, and that’s how I started learning more about RESTful services, authentication, AWS services, pub-sub, distributed systems and so forth.
The interesting part here is that I didn’t learn about any of these through books or formal education. Rather, I needed to get that set of features done and there were the bottlenecks.
So I thought, let’s go solve it!
There were many times where I was stuck in analysis paralysis — a state where I over-analyzed scenarios and ended up not able to make progress.
Those trying times were the greatest learning opportunities. I started to learn feature scoping, negotiations, monitoring, alerting, and documentation. Each step of the process revealed more things I needed to learn. I grew the most during these 2–3 years, both as an individual and software engineer.
After suffering through my first job search, I told myself that I must be prepared in future interviews.
I started preparing for interviews by charting out an overview of what I was good at, bad at, and where I could improve. I broke it down into three categories: data structures, algorithms, and system design.
Having worked in PHP for most of my professional career, and C++ in college, I wanted to try something a little simpler and less verbose for interviewing.
For this reason, I picked Python. It is a great language to learn, easy to pick up, supports many data structures out of the box, and can be written quickly on the whiteboard. I learned Python by going through YouTube tutorials like these, and also reading their documentation. I prefer Python 2.x, but you can go for either 2.x or 3.
Also, another reason why I picked Python is that it’s highly readable and easy to write on a whiteboard. Here’s a trivial comparison between C++ and Python.
A C++ program to sort in descending order:
Compare that with Python’s version:
I’ve received feedback from interviewers to err on the side of brevity in an interview. In a 45-minute interview, you want to use most of your time solving the actual problem.
Pro tip: pick a language that’s less verbose so that you can write the code more quickly on the whiteboard.
I spent about a week going through simple challenges on LeetCode, HackerRank, and Project Euler to familiarize myself with their interfaces, and to get used to writing code in Python.
The first week gave me insights into my competence level at certain programming languages. I spent another week going through some design challenges like “design X” and went as wide and deep as I could.
This was a lot of fun for me, because I often looked at iOS apps and tried to figure out how they did it. For example, how would you build Instagram from scratch? (I was asked this at Facebook.)
My background is in API designs and service-oriented architecture, so I took this opportunity to show how I would design my own version of Instagram. And because I have some iOS programming experience from my side-projects, I could talk a little bit about callbacks and push/long-polls here.
I started the conversation with some features I’d like to have on my own version of Instagram: likes, upload a photo, and a simple timeline. Feature scoping enabled me to build a very solid API because I know these scenarios well.
I then drew some pictures of a high-level design, of how the client would interact with the backend, and of how the backend would store the data.
I started small, and then added more components where needed and proactively sought where the bottlenecks were. I made educated guesses (read educated, not blind guesses) on what the requirements would be, and how each technology would fit in well. And also equally important, what technologies would not fit well.
For example, why would you use Cassandra over MySQL to store certain information (hint: scale, speed of development, schema reviews), why use OAuth over simple authentication, Redis vs Memcached for caching data, streaming vs batch processing, and so on.
There are many areas you can explore here, so typically a one-hour session is not enough. To do well on these questions, you have to read and learn about trade-offs. Pros and cons of technologies in the industry. For this, I recommend a site like HighScalability.
Take it like a typical brainstorming session with a coworker, so explore as widely and as deeply as you can.
It’s crucial to know that these design interviews are meant to explore how much you know and how well you know it, and it’s an opportunity for you to shine. I watched this YouTube video from an ex-Facebook engineer about how to solve design problems, and it gave me insights that helped me tremendously with my design interviews. My two main lessons from it: drive the design conversation, and show what you know.
I listed out my competency level for: data structures (linked list, hash map, binary tree, binary search tree, heap, array), algorithms (binary search, hashing, dynamic programming, sorting), and language-specific syntax and libraries (like sort, lambda for Python, appending, indexing).
I picked the area I was worst at, and started working on it: algorithms.
Algorithms have never been my forte. It’s been a while since my college days, and I didn’t spend much time doing binary search in my day-to-day career. I had an inkling of how each algorithm would perform, and in what scenarios to use them. But I wasn’t 100% comfortable with writing a binary search in under 10 mins. On a whiteboard. In front of an interviewer.
I also picked up a bunch of fine-point markers from Amazon, which work amazingly well. Perhaps it’s just me, but the fine-point markers in interviewing rooms usually don’t work at all. I’d usually scramble for 2–3 mins looking for a working pen, and that’s 2–3 mins you can’t afford to waste. Plus, fine-point markers allow you to write 5–8 more lines of code on a typical whiteboard vs. thicker ones. :)
Pro tip: Get your own set of fine-point markers.
I got a whiteboard from Costco for $50, some books from Amazon (listed in the tools I recommend section below), and started practicing. I made sure I ramped up on binary search, recursion, dynamic programming, BFS and DFS. A lot of interviewing questions revolved around recursion and binary search or some variations of it.
The best interviewing questions I’ve seen had many different solutions to them, and there’s an additional layer added on top as you progress through.
One Google question I had was related to file-system directories, and how to traverse them (hint: recursion). I solved that relatively quickly, and the interviewer asked how to identify a missing file in that directory. That was a little more difficult, but I got through it. And we then moved into how to rebuild the directory, how to serialize/deserialize it, and we spent a good chunk of time debating how file directories work underneath the hood. It was a very enjoyable session for me.
It was a nerve-wracking experience, to say the least, and a real roller-coaster.
I allocated my time in the following manner: 20% resume, 20% research and 60% interview preparation.
Jivelite for mac. Jivelite - The Squeezebox Touch Clone - PiCorePlayer. Tuesday, November 1, 2016. Once upon a time there was an awesome audio device called the Squeezebox Touch from Logitech. The Touch was loved by audiophiles for its touch screen interface and great DAC. Jivelite is a visualization software for controlling the squeezebox playback. With this extension an easy to use and customizable user interface can be displayed via HDMI connection to any screen. With this interface the squeezebox activity can be controlled. The Jivelite-lua-x8664-0.1.0r199.dmg disk image package is for 10.7+ 64-bit only and needs to be installed in /Applications If you created an automator script for the /opt/jivelite tarball you need to delete it, removing it from the trash and reboot your Mac BEFORE installing the dmg. Jivelite-lua-0.1-r199-win32.zip Lua 5.1.5 to be compatible with most applets written for the touch, radio and controller. Jivelite-0.1r189-win32.zip LuaJit 2.0.5, new global quit action, mapped to lower case letter o. Installation There is no installer for Jivelite for Windows and it does not create any registry entries. Installing JiveLite with PicorePlayer is just an affair of few mouse clicks. But with Armbian, this is a bit more complex. In previous steps we installed Squeezelite and an I2S DAC, so we build our own player. Then it was tempting to use a 1920x1020 screen and install JiveLite. For references: installing Squeezelite (LMS Player) installing I2S DAC.
I spent 20% of my time fixing up my resume, which hadn’t been updated in at least three years. I took a hard look at the stuff I’ve done in the past, and picked projects I handled end-to-end, regardless of complexity.
The reason for doing this is two-fold. Taking a project from start to completion demands discipline and leadership — two of the traits I’d like to be identified with.
Secondly, ownership of a project end-to-end means I can talk about each aspect of the project at length and in depth. This proved critical in helping me navigate my design round at Twitter, where they grilled me hard on not only the designs of my projects, but also the decisions behind them.
20% of my time was used for research. Research in this case meant doing due diligence on companies I was interested in and reaching out for referrals. Having referrals helps with return calls.
From my experience, I sent out 20 or so cold messages to startups and mid-stage companies, and only heard back from a handful. But, almost all the companies I was referred to by an existing employee sent me a message within a week. This is anecdotal, but there’s value to be had there.
I am not that sociable, and I didn’t know many people who’d be able to refer me to a company I was interested in. To solve that problem, I went on LinkedIn. They have a search functionality that I used to search for 1st and 2nd-level connections. 2nd-level connections are people who’re one hop away from your immediate circle. In other words, we have mutual friends who can vouch for my credibility.
This is incredibly important, because cold-calling someone for a job is very, very hard, especially in today’s market. People tend to err on the side of caution when it comes to cold-callers. Using LinkedIn was super helpful for my research phase.
Looking back at all the companies I interviewed at, here are my thoughts on each of them:
In many ways, I’d say Twitter’s interviewing style was hard. But at the same time, it was more interesting and personable than other companies I’ve interviewed at.
Their interviewing process starts with an introductory phone call with an engineering manager. That’s followed up by one or two technical phone screens, depending on how you perform. If you do well, they’ll fly you out to the office you’re interviewing for, which was Seattle in my case. There are three 1-hour-and-15-minute rounds, each with two interviewers.
The first two technical phone screens are the standard, run-of-the-mill technical screens where you solve coding problems on a shared coding doc.
The onsite rounds, however, are much more conversational and feel much less intimidating. The interviewers will ask you in-depth questions about your past projects, and they’ll grill you on what you’ve done in the past. If you claim ownership of a project, you should expect some questions about it. You’re encouraged to use them for references and to bounce ideas off of.
I never felt any pressure to magically come up with a fully working solution, and it felt highly collaborative.
In comparison, interviewing at Facebook and Google felt much more mechanical. They have one or two technical phone screens, and five to six onsite coding rounds. Each round involves some coding on a whiteboard, and you’re expected to come up with a near-perfect solution in a reasonable amount of time.
Facebook has two coding rounds, one design round, and one behavioral round.
I went through an additional shadow round at the end of the day, which didn’t count towards my overall score.
Google had five coding rounds, none of which focused on designs, and not a single interviewer asked about my previous projects. I don’t necessarily think this is bad. But I think it felt very mechanical and didn’t give much opportunity for the engineer to show what they’re capable of. Some people do well in these scenarios, much like some students do well in exams.
I did not enjoy my interview with Pinterest. I think the product itself is interesting, and their engineering team seems to be working on very cool technical problems. But I definitely had a negative experience during my interview there.
Pinterest has three coding rounds and one design round. Of those four rounds, the design round was most disappointing to me. Here’s why:
The interviewer came in late, and he spent a few minutes glancing over my resume before proceeding to draw some APIs on the board. He gave a short description of what he expected the API to do, and asked how I would solve it. We clarified the features of the API, and I started describing my solution using the whiteboard. About 5 minutes into it, I turned around and saw him taking a nap!
Not cool.
I gave the recruiter my feedback in a survey, and I didn’t hear back from them after that.
I won’t delve into specifics of the questions I was asked during all the interviews. Instead, I’ll share some of the insights and useful tips I learned from my preparation process.
Technical interviews are incredibly difficult, and sometimes it’s a hit-or-miss. The best opportunities, however, are reserved for those who are prepared.
It took me about 2 months of deliberate practice and preparation for my interviews. I spent about 20 hours/week, or 80 hours/month, learning and writing notes on top of a full time job.
To build up my resume, it took 3.5 years of focused, deliberate work. I intentionally picked things that were tough and icky so that I could learn more than anyone else. Even though I don’t have a brand name university or top-tier tech company on my resume, I made up for it with a clear, thorough understanding of the projects I worked on. And this was possible because I researched and wrote down notes of everything I learned, and have a system to review them.
Remember: the strong survives, the tough thrives.
TL;DR: Don’t give up, set yourself up for opportunities, practice a lot, and stay hopeful. Focus on the process, and take a disciplined, dedicated approach to the process.
(I share more resources I personally have used and recommend on zhiachong.com, if you’re interested in learning more.)
Thanks for reading my story! You can find me on Twitter and LinkedIn. I would love to connect and talk more about tech, startups, travel :D
Credits:
Brandon O’brien, my mentor and good friend, for proof-reading and providing valuable feedback on how to improve this article.
YK Sugishita, an up-and-coming Youtube star who left his job at Google to pursue his dreams, for proof-reading and giving critical feedback.
PermalinkGitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uppackagechapter01ArraysAndStrings; |
/** |
* |
* Problem: Write a method to replace all spaces in a string with '%20 You may |
* assume that the string has sufficient space at the end to hold the additional |
* characters, and that you are given the 'true' length of the string. (Note: if |
* implementing in Java, please use a character array so that you can perform |
* this operation in place.) EXAMPLE Input: 'Mr John Smith ', 13 Output: |
* 'Mr%20John%20Smith' |
* |
* Solution: Start from the end and work backwards |
* |
*/ |
publicclassUrlify { |
publicStringreplaceSpaces(char[] chars, intlen) { |
if (chars null) { |
return''; |
} |
int spaceCount =0; |
int index =0; |
// first loop, locate last position |
for (int i =0; i < len; i++) { |
if (chars[i] '') { |
spaceCount++; |
} |
} |
index = len + spaceCount *2-1; |
// second loop, replace spaces from the end |
for (int i = len -1; i >=0; i--) { |
if (chars[i] '') { |
chars[index] ='0'; |
chars[index -1] ='2'; |
chars[index -2] ='%'; |
index -=3; |
} else { |
chars[index] = chars[i]; |
index--; |
} |
} |
returnnewString(chars).trim(); |
} |
publicstaticvoidmain(String[] args) { |
Urlify u =newUrlify(); |
char[] chars ='Mr John Smith '.toCharArray(); |
System.out.println(u.replaceSpaces(chars, 13)); |
} |
} |