Coinciding with the Fall Career Fair at my US school, Illinois Tech, I gave a talk about things Engineering students in general, and CS in particular, can do in their last few semesters to land a job in tech. Right now we're heading towards the Spring Fair and since I can't attend this time, I think some of you will find it useful that I outline here some of my thoughts on this widely-discussed issue.
Of course all these tips have a healthy amount of survivorship bias, but nonetheless they have so far worked out fine in both my friends' (many of them also international students once) and my experience. Focus is for CS or software-related jobs, and the order is chronological: I'll start from before even planning on applying for a job, and finish whenever you get the offer after having pulled off an amazing on-site interview. Through the end I will make some remarks about other fields, which honestly are much harder to get a great job at.
Note that you could also get a job in software without following any of these things. In here, however, we're aiming for the stars, for the best jobs available. Being an international student is not a handicap for pulling this off, not at all. Disclaimer: I didn't follow every single point of what's next and I landed an awesome job connecting cars at Nokia. Just imagine if you follow all of it.
1. Study with an F-1 visa
The easiest way to getting a job starts by a (not so) simple thing: come study with an F-1 visa that allows for OPT. Without this it will be virtually impossible unless you're already a superstar, which begs for question: do you actually need to study to get a job? You'll get it anyway. OPT stands for Optional Practical Training, and it is your best beachhead to start working here. It gets you a work permit valid for twelve months after you finish your studies that can be extended for other seventeen. Great deal.
2. Get stuff done and publicize it
So now you are an ambitious Computer Science student in an American university. Impressive! Yes, it really is, you made it here, you should be proud of yourself. But enough with that, you were ambitious, remember? This is only the beginning.
You have more time than you can even imagine while still studying. Don't waste it. Examples of things you can do:
- Join an open source project and be active about it.
- Join a research lab at your Department. 
- Side projects, side projects, side projects! They are fun, you can work with your friends on something you're passionate about, without any pressure. Remember, you're still not working, do whatever you want. These can even lead to great things in the future .
- The best one of all if you're staying in Summer, get a summer internship at some company with CPT (Curricular Practical Training). You might even get a job offer as a result of the internship!
All of this is cool, you can talk about it and feel great, but who will notice? In order to reach a larger audience so your awesomeness can be noticed all over the place, brag about it, blog about it. Write down how you solved that technical problem, how you designed that side project and why you did it, how was it working at
<name_of_the_cool_company>. Writing has also some great benefits. It helps structure your ideas and communicate better .
In the end, it all boils down to one thing: consider yourself a brand. The more value your personal brand has, the better professional opportunities you'll have in the future. You should have started building that brand yesterday.
3. Start networking/applying early
As many successful people always point out, "who you know is what you know". I wouldn't go as far, especially in the earliest stages of a career in tech, but it is always important. You already have a great network by completing your degree. You've worked on assignments with people, pushed code with people, been advised by people. People who have seen you work, have seen your work and have a clear idea about how amazingly talented you are.
Meet interesting people, just say hi and try to find points in common. Word of advice though: don't fake it, don't be plastic, let it flow naturally. Good opportunities will just happen if you let them find you. And knowing people is a hell of a good way for them to find you.
Actions you can take on this side, you ask? Join a Meetup, for example. 
Another thing which is vital in this venture: start applying early. I can't remark this enough. Well, maybe I can; START APPLYING EARLY. A rule of thumb would be 6-7 months before graduating. You then have plenty of time to distribute among your day-to-day duties and applying for jobs, plus you won't be on a hurry to accept the first thing that looks good enough. The more time you have, the pickier you can be, the better the job you're going to get. 
4. Preparing interviews and getting an offer
There's this single most common misconception that all fresh-out-of-college, including me, have. No, interviews are not unidirectional. They are a way for them to sell you the company and the team, as well as a way for you to demonstrate that you are a good fit in terms of company culture, overall niceness and skills.
For this reason, prepare yourself in three ways: your story, your questions, and your skills.
You should be able to tell a compelling story about yourself. Sell yourself; after all, the best way to selling is just telling a good story . The things you did you're proud of, the challenges you overcame. In this area you, as an international student, have an edge over your American counterparts. You have traveled the world, you're in a different country, what is it so awesome about you that you got here?
Be determined to know everything about the company you're interviewing for. Apart from sending the message that you're interested, it helps to know as much as possible. After all, you'll hopefully spend 8 hours a day (at least!) inside that environment. VERY IMPORTANT: if they are a consumer-oriented company and you can play around with the product, do it. Extra credit for giving feedback/improvements! Questions? You name it –development workflow, how they do their testing and how they care about the quality of their code. Be opinionated about technology without sounding like an asshole. As a good final question, let them tell you something cool about the company and the people there.
Skills. The make-or-break. The ultimate test. You'll have to have a deep knowledge of big-O notation, algorithms and data structures, as well as your language. Choose one and exercise your algorithmic coding. I recommend Cracking the code interview for getting a feel about the problems you're going to face, though you might have to dig deeper. Read this classic by Steve Yegge for inspiration. Ideally, this would be one between Java  (for big co's), Ruby or Python (for startups/smaller companies). Again, extra credit for knowing about large-scale system design, networking, Linux administration/shell scripting, as well as having an eye for design.
The process usually goes like this: first contact by the recruiter, then one or two phone screens with live coding, and a final on-site interview. Now that I am on the other side, I use CoderPad a lot for the phone screens. Also, if you have on-site interviews on other places –it's likely the Bay Area will try to lure you–, try to pack them all on the same trip. If this isn't possible, no problem. Just make sure you do enjoy the trip. You may not get a job offer, but take advantage of the experience. Remember, they are flying you because they want you to see them! They want their engineers to judge you and see if you are a good fit.
Finally, if you get the offer don't hesitate to ask everything about compensation/benefits/visa sponsorship. Don't be too greedy on salary (market rates are OK; you're just out of college, what are you going to do with that much money anyway?!). However, be pushy on visa sponsorship. You need sponsorship, that's not negotiable.
If you liked the company and the people but finally didn't get the gig –well, it's not the end of the world because you started applying early, remember? Maybe you couldn't show your potential, or an interviewer was having a rough day. That's practice, and practice makes perfect. Plus a minor letdown once in a while keeps you hungry. At least for me, it's motivating!
5. Rest and enjoy your new life? Not really.
Three things you have to keep doing, or get even better at: keep doing stuff on the side, keep networking, make progress in your visa status.
The last point is probably the most important one –this is a cat-hunts-mouse. You are the mouse, and the US Department of Homeland Security is the cat. Hurry up switching to a better visa before you lose your status. You have twelve months for the OPT, which can be extended for other seventeen . That means applying for the H-1B visa ASAP. H-1Bs are a lottery; you might get one, you might not, though the odds are (usually) on your side.
Once you get the H-1B you can relax a bit, but don't, because you are still somehow tied to your employer. If you switch jobs your new company will have to go through the same cumbersome process. You want to get the holy grail: the green card. It gives you complete freedom and flexibility, and believe me that's great, because...
Today's job market swings really fast, especially in tech. This can be really good or really bad. Prepare for the bad, and you'll know how to make the most out of the good.
Notes for non-software fields
Software has a unique, double-edged characteristic: it is so easily demonstrable and distributable that your knowledge and your quality as a professional can be measured incredibly easy. If you're damn smart, they'll notice. If you got good grades at college but you don't really get this programming thing, they will, too.
However, in other fields (e.g. Mechanical Engineering) this is more difficult to assess. Your work is usually more opaque, harder to measure. Plus there's less demand and it is better covered by people with much better visa status than you (citizens, residents). Networking plays a vital role here. Something that has worked out well for many friends of mine is looking for contacts at subsidiaries of companies in your home country. Especially if your country has a much different language and/or culture than the US, you'll be at an advantage there.
None of this seems to work? If you know how to code, go back to point 2. If not, learn and then go back to point 2.
In reality, getting a good job in the US is just about pattern matching. Ask for advice to people you know who came and were successful on their search, and find out what worked for them. Your mileage may vary, but if you really, really want to, you'll work in the United States. It's great, let me tell you. Worth the effort. 
Finally, if you think you have what it takes write me at
pedro(at)<my_domain_name>. Maybe I can get you an interview ;)
Discuss on Hacker News
 My good friend Corentin Debains points out that while academic research gives you the highly theoretical side of things, side projects and/or open-source provides you with real-life experience, stuff that you can directly apply. Things that are not taught or can't be picked up in university correctly (Web, app development). This duality gives you two views of software that meet in the middle, allowing for a much better overall skillset. That healthy mix of hard science and hacking with stuff proves invaluable.
If you're still in school, you're surrounded by potential cofounders. A few years out it gets harder to find them. Not only do you have a smaller pool to draw from, but most already have jobs, and perhaps even families to support. So if you had friends in college you used to scheme about startups with, stay in touch with them as well as you can. That may help keep the dream alive.
Paul Graham, "Why to not not start a startup"
 Believe me, one of the reasons you're reading this is because I took the writing thing personal.
 Shameless plug: some of us are trying to restart the Hacker News Chicago Meetup. If you're from the windy city and overall curious hacker, join!
 A universal rule that holds for all things in life: don't be/look desperate.
 Seth Godin on telling stories.
 To say that I don't personally like Java would be an understatement, but the software industry is what it is, and BigCo's are usually slow on that front. If you only know Java, play around with some JVM functional language such as Scala or Clojure. Boy would you spark my interest only by saying "I know some Scala/Haskell/Clojure/Erlang".
 Depending on your employer having eVerify.
 Or... you can take all this advice, trash it and go found a startup. Hope I do that someday :)
Thanks to Corentin Debains, Jorge Coca, Hector Veiga and Andrea Naranjo for reading drafts of this.