Wednesday, November 17, 2010

Life: Updated instructions

Wow, there was tons of response to my last post. I probably got 40 pings on IRC over the last week or so, and already have a few code reviews in progress by new contributors.

I want as many people as possible to get involved in programming, and Chromium in particular, but I can't help people individually at that rate. So I've updated the instructions so that they require less manual steps by me.

I'm still more than happy to help people with questions once they get started.

Good luck!

Thursday, November 11, 2010

C++ version of JSON Schema

Way back when we were starting the extensions project, I mentioned that we were using JSON schema for API validation.

This worked out pretty well, but the downside is that it was implemented in JavaScript, so it couldn't really be used effectively in Chrome's browser process (for somewhat obscure technical reasons it's complicated to run JavaScript in Chrome's main process -- we usually only run it in child processes).

So for a really long time, I've been wanting to re-implement it in C++ so that I could use it for work in the browser process too. Finally got around to it:

This only relies on Chromium's "base" library (which is really quite nice, btw), so it could conceivably be re-used by other projects. For example, I'm hoping that we can use it on the server side, in Chrome's web store.

Figured it might be useful to someone else someday, too.

Wednesday, October 20, 2010

Wherein I help you get a good job

Edit: The response to this post was kinda overwhelming. I've modified some of the steps below to require less manual work by me.

From a recent post on Hacker News:

Friends of mine are in the same position as this guy. They recently graduated with good degrees from a decent university with no illusions that finding a job was going to be anything but difficult. Rather than feel like they're owed a job the ones I know have spent hours _every_ day applying for jobs for the past (up to) 2 years with no success. Most of the time they get no reply from these companies (fair enough), but the few times they do get an interview someone else with more experience gets the job.

This sucks. There has been an education bubble over the last few decades that has told kids that all they need to do to guarantee success is go to a good school, make good grades, and get a degree. The result is that in many fields, there is vastly more supply than demand.

But there are a few fields that are hiring like crazy. One of them is mine: software engineering. Major tech firms cannot hire fast enough. And the barrier is low enough that you can start learning today, for free. If you work hard, you can know enough in a year to get a good starter job. It's been this way for more than a decade, and I suspect another decade of growth at least.

That's the good news. Here's the bad news: It's going to be hard, and you'll need to give up on whatever you went to school for and spend a year learning something new.

But remember: the time you spent in school is a sunk cost. You can't get it back. Doing nothing just makes matters worse. I'm offering you a way to make progress today.

Ok, still here? Here's how to get a good job programming in six easy steps:

1. Download and build Google Chrome
  • There are also build instructions for Windows and Linux if you prefer
  • If you don't like Chrome, you can also work on Firefox or Safari, but the rest of these instructions are optimized for Chrome since that's what I'm familiar with.

2. Browse the bug database to find something to work on. Here are some useful queries:
I can personally review changes in these areas, and I try and keep these lists well-stocked with good starter bugs. You can also work in other areas, but you may have to find someone else to review your work.

If a bug has an owner assigned, but there has been no activity for a week or so, comment on the bug and ask whether you can take it over.

3. Once you have picked a bug, comment on it saying you're going to work on it. If it is in feature:extensions,apps, I will get notified of your comment, and will mark the bug as owned by me so nobody else grabs it. I will probably also add some comments about where to start.

4. Study the code, referring to a C++ tutorial as needed. You may also want to buy an actual paper book on the subject. Make the changes required to fix the bug. Once you have it working, send me (aa-at-chromium-dot-org) a code review with your changes.

5. Repeat steps 2 and 3 about 50 times.

6. Update your resume to say that you are a junior software engineer and you have contributed significant code to Google Chrome (or Firefox or whatever), and provide a link showing your work.

Ok, so these steps aren't really "easy". Some of them will take months. Just getting Chromium compiling is going to take awhile. I've purposely been vague on the details so you can figure it out on your own. You'll need ingenuity, a search engine, and a lot of patience.

But I guarantee, 100%, for-sure, that if you complete my program, you will be able to easily find a good starting job programming.

Hiring programmers is super hard. It's nearly impossible to evaluate whether someone is good without examples of their work. By working on open source projects like the ones I've listed, you make it easy for hiring managers. They can see what you can do and how you work with others.

There's nothing stopping you from making this happen. It's going to be hard, but you can do it. And there's lots of people that are willing to help once you take the first few steps.

Thursday, January 28, 2010

Academic paper on Chromium extensions

Protecting Browsers from Extension Vulnerabilities is a paper that covers some of the interesting security features of the Chromium extension system.

The isolated worlds feature that I wrote about earlier is described toward the end. Isolated worlds separate each JavaScript program that has access to a web page's DOM. Each program can modify the DOM and see changes made by other programs, but programs cannot exchange JavaScript references. This setup prevents privileges from accidentally leaking between programs. Isolated worlds are now implemented directly in WebKit (thanks to Adam Barth), so they could show up in other WebKit applications in the future.

My other favorite feature is that an extension's unique ID is a public key. The extension is signed with the corresponding private key, which means it is impossible to have ID collisions. Even if a developer copies an existing extension to get started, he won't be able to copy the extension's ID because he would need the private key in order to sign it.

Thursday, December 24, 2009

Hey I used that license, too

Was amused by Evan's take on JSMin's software license. Apparently all of Crockford's work includes the clause "The software shall be used for Good, not Evil" in addition the standard MIT license text.

I think at one point I saw this, internalized it, and spat it back out as "This code is public domain. Please use it for good, not evil."

I know that this stuff is really serious business to some people, and they get frustrated by these random acts of frivolity. "Don't you know," they say with a stern face, "software licenses are no place for fun and games".

Pfffft. The license is awesome. I appreciated the joke when I first saw it, and am appreciating the ongoing humor it is providing.

I do see how it would prevent some organizations from using the code. Mostly those that have become large, risk-averse, and so disconnected from the community that they are actually, honestly afraid that Crockford is going to come after them for using JSMin for evil.

Sadly, Google apparently now falls into that bucket.

Friday, July 17, 2009

Bundling multiple versions of binary XPCOM components

I happened to come up with what I think is a clever hack for getting around a sticky compatibility problem in Firefox extensions.

The problem is that if your extension includes a binary XPCOM component that uses unfrozen interfaces (and it is hard not to, lots of things are unfrozen), then it is highly likely that you will have to recompile your component for each new version of the Gecko SDK (and therefore most new major versions of Fierfox).

The Mozilla wiki proposed the idea of using a "stub component" to sniff the environment version and load the right XPCOM component, but this is pretty complex to implement.

I realized that you can just use JavaScript to do the same, and it is trivial. Hope this helps someone else out (I've also updated the wiki).

Friday, June 26, 2009

The designs of

Are beautiful.

I say designs because I just realized that each article has its own unique design.

I read most of these when they were posted, but I think the fact that they were posted relatively far apart made me miss the fact that each one has a different look.

Some of the designs are very intricate and clearly were a lot of work. For example, check out about.html. Tying things together is a common header and footer that brings continuity and allows you to navigate between articles.

I attempted to do something like this once for my own blog, but found that I simply did not have the time and energy to come up with a good design for every single post.

I'm glad that someone else did, and I'm looking forward to the next article.