The blog of Corey Ford2016-01-18T05:04:40+00:00http://coreyford.nameCorey Fordcorey@coreyford.nameThinkPad X220 Rehabilitation2015-03-17T00:00:00+00:00http://coreyford.name/2015/03/17/thinkpad<p>My primary computer since I started at Cal Poly has been a Lenovo ThinkPad X220, an awesome 12.5” ultraportable laptop.</p>
<p>I recently had to replace several components, and learned a lot in the process. While that knowledge isn’t very useful to me anymore (hopefully!), perhaps it will be useful to someone else.</p>
<hr />
<p>It all started in December, when the screen started flickering and showing a stretched image. Adjusting the hinge usually resolved the issue. (It would later develop new and interesting failure modes, and I would develop increasingly complex workarounds.)</p>
<p><img src="/images/2015/thinkpad-screen.jpg" alt="X220 stretched image" /></p>
<p>“No problem,” I thought. “I’ll just get a new LCD cable and follow the instructions in Lenovo’s Hardware Maintenance Manual to replace it.”</p>
<p>Three months later, the laptop is finally back to full functionality.</p>
<p>A full play-by-play of the process would probably just be confusing, so I’ve tried to better organize the lessons I learned along the way.</p>
<h2 id="lcd-cable">LCD cable</h2>
<p>The cable that connects the LCD panel to the system board (FRU <a href="http://www.ebay.com/sch/i.html?_nkw=04W1679">04W1679</a>) is, understandably, one of the harder parts to replace, since it requires taking apart both halves of the laptop as well as the hinge. But the manual has good instructions for every step.</p>
<p>The connector between the cable and the LCD panel is very slim and a bit tricky to get right and even to apply pressure on without worrying about the LCD. Since it’s also hard to take a good picture of, I’ll just note that the two sides of the cable need to fit under the corresponding flanges on the panel, after which it should make a snug connection even without applying the tape.</p>
<p>On my first attempt, I bent the end of the cable (and temporarily also the port on the LCD) out of shape, and had to get a second replacement. When that failed to improve the condition of the screen, it was clear that the panel itself needed to be replaced. (But the original cable was definitely showing wear, so I’m glad to have replaced it.)</p>
<h2 id="lcd-panel">LCD panel</h2>
<p>The LCD panel itself is easy enough to access by removing a total of 6 screws.</p>
<p>Identifying a replacement panel of the IPS flavor (which I knew I wanted) turned out to be somewhat difficult. Lenovo’s FRU numbers don’t seem sufficient here. After receiving (and returning) a lower-quality TN panel, and some <a href="https://www.reddit.com/r/thinkpad/comments/2t94me/repair_or_replace_x220/cnxgqvm">discussion on reddit</a>, I found it effective to just search for the keyword “IPS” to find IPS panels for sale. One of those just arrived in my mailbox, directly from Hong Kong.</p>
<p>The manufacturer’s (here, LG’s) model numbers are also useful: my original panel was an LP125WH2(SL)(B1), the TN replacement was an LP125WH2(TL)(B1), and the final IPS replacement is an LP125WH2(SL)(T2) (the seller was happy to confirm compatibility with the original before shipping).</p>
<h2 id="keyboard">Keyboard</h2>
<p>But that’s not quite the end of the story. While disassembling the laptop the first time, I tried to clean the keyboard in tap water, apparently didn’t let it dry out enough, and found I couldn’t even boot anymore (the power button is part of the keyboard).</p>
<p>So, it was time to get a replacement keyboard too (FRU 45N2211, 45N2306, and others, for the U.S. layout). I had some bad luck with used keyboards that didn’t quite work right, and ultimately got a brand-new one that’s doing very well.</p>
<hr />
<p>Finally, three months, two attempts to replace each of three parts, and $120 or so later, the X220 is back in better shape than it was before the problems started.</p>
Technical Presentations2015-03-08T00:00:00+00:00http://coreyford.name/2015/03/08/presentations<p>I’ve given a number of talks to various student clubs over the last several months. In particular, I’ve spoken on:</p>
<ul>
<li>Debian (<a href="/files/talks/debian.pdf">slides</a>, <a href="https://github.com/coyotebush/talk-debian">source</a>)</li>
<li>Free software (<a href="/files/talks/foss.pdf">slides</a>, <a href="https://gist.github.com/coyotebush/3ecfae2258a8e060c5d6">source</a>)</li>
<li>PGP (<a href="/files/talks/crypto.pdf">slides</a>, <a href="https://github.com/coyotebush/talk-pgp">source</a>, <a href="https://www.youtube.com/watch?v=gEq9Y-veS6w">video</a>)</li>
<li>Git (<a href="https://www.youtube.com/watch?v=S3WR1A05iUc">video</a>)</li>
</ul>
<p>I’ve also been involved in a half-dozen class project presentations during the past year, with more certain to come in the next few academic terms.</p>
<p>While I don’t profess any particular talent in public speaking, I hope that I can improve through practice. And I find that I enjoy it fairly well, which is a little surprising since I’m not known to be especially outgoing and I often find <em>writing</em> tasks stressful. So why is that?</p>
<p>An obvious difference between public speaking and published writing is the immediacy of feedback. With a live audience, I can adapt the presentation based on reactions, so perhaps there’s less abstract worry about how it will be received. Absent recording, the ephemerality of a spoken presentation helps a lot with those worries, too.</p>
<p>There might also be lower standards for, say, originality and precision in the spoken context. I enjoyed teaching my fellow students about those concepts, but on the Internet I wouldn’t have as much to add to the larger discussion. That said, speaking is <em>remarkably</em> effective at transferring ideas, for a variety of reasons, while getting people to read documents is challenging.</p>
<p>So, perhaps the audience and topic make a bigger difference than the medium. But I think I’ve come a reasonably long way from my daunting first public speaking class three years ago.</p>
English2014-09-06T00:00:00+00:00http://coreyford.name/2014/09/06/english<p>One fascinating difference between Europe and the United States is the role of the English language.</p>
<p>While the bachelor’s programs at KTH are taught in Swedish, the Master’s programs (from which I took courses) are taught in English. Perhaps half of my classmates in technical courses were Swedish, with the rest representing many parts of Europe and the world. Some of the latter were exchange students, through the EU’s Erasmus program or otherwise, and others were full-time Master’s students.</p>
<p>Academic/technical collaboration across language barriers was interesting to experience. In every course at KTH, I worked on teams with non-native English speakers, and most of my professors were Swedish. Reading European research papers and attending FOSDEM (conducted in English but with a predominance of German and French attendees) further illustrated the situation.</p>
<p>In all these cases, I often found it tempting to think that others’ knowledge of the technical material was weak. But, of course, communication is a <a href="https://en.wikipedia.org/wiki/Models_of_communication">complex process</a>, heavily influenced by culture and other factors, and it’s difficult to identify failures that occur in expressing, receiving, or responding to a message. So, communication problems were more likely than intellectual ones to have led to difficulties in exchanging ideas with my colleagues.</p>
<p>As a tourist in southern and eastern Europe during the summer, a pattern was clear. A few European countries—Spain, France, Germany, Italy—take pride in their native (eponymous) language and are not particularly accommodating to English-speakers. But the rest seem to accept that it’s unreasonable to expect visitors to learn their language and pick English as a <em>lingua franca</em>, often followed by some of those other four countries’ languages. (Not their neighbors’ languages—almost nothing is labeled in both, say, Hungarian and Romanian.)</p>
<p>Back in the US, I find I’m more accepting of the occasional non-native English I encounter and often surprised by its quality.</p>
Adventures in Germany, Finland, and Russia2014-05-20T00:00:00+00:00http://coreyford.name/2014/05/20/germany-finland-russia<p><em>A belated review of my big excursions during this semester.</em></p>
<p>Although I’ve been kept busy by school projects and largely content to enjoy the beauty of Stockholm, I made room for two more trips in addition to <a href="/2014/02/06/fosdem.html">FOSDEM</a>.</p>
<h2 id="between-courses-lower-saxony">Between courses: Lower Saxony</h2>
<p><img src="/images/2014/grosse-aue.jpg" alt="Große Aue" />
<em>the Große Aue</em></p>
<p>The KTH calendar, as I’ve probably mentioned before, divides each semester into two eight-or-so week study periods, and most courses are taught entirely within one of these. In late March, between the exams of <a href="/2014/03/12/courses.md">study period 3</a> and the first lectures of study period 4, I had a relaxing visit with long-time friends who now live in northwestern Germany.</p>
<p>For the way down, I had some time to spare and there weren’t any appealing flight options, so I opted for the train. From Stockholm, it was a 13-hour trip (05:20–18:30), with breakfast while racing across southern Sweden, lunch in drizzly Copenhagen, a <a href="https://en.wikipedia.org/wiki/Vogelfluglinie">train ferry</a>, and several efficient transfers in Germany.</p>
<p>My destination was the lovely <a href="http://www.ic.org/directory/lebensgarten-steyerberg/">Lebensgarten</a> community in the town of Steyerberg—much different from bustling Stockholm. In contrast to Sweden’s rocky forests, northern Germany is flat, green, and (especially in this area) agricultural. I had several nice walks in the surrounding fields and forests, in addition to plenty of good food and company.</p>
<h2 id="easter-helsinki-and-st-petersburg">Easter: Helsinki and St. Petersburg</h2>
<p>Easter is a four-day weekend in Sweden, and I joined a five-day trip to Helsinki and St. Petersburg organized by <a href="http://openyourrussia.com/">Bigland</a>.</p>
<p>The schedule, starting from Stockholm, involved two 16-hour overnight ferry trips in each direction. Friday and Tuesday were spent in Helsinki; with a few others, I walked around that somewhat sleepy city and visited the <a href="https://en.wikipedia.org/wiki/Suomenlinna">Suomenlinna</a> fortress.</p>
<p>Saturday through Monday, in St. Petersburg, we had a group of about a dozen and a well-organized program to visit some of the major sites:</p>
<ul>
<li>
<p><a href="https://en.wikipedia.org/wiki/Saint_Isaac%27s_Cathedral">Saint Isaac’s Cathedral</a> (with nice views of the vast city)</p>
<p><img src="/images/2014/spb-st-isaacs.jpg" alt="view of the city" /></p>
</li>
<li>the Hermitage Museum (magnificent)</li>
<li>the <a href="https://en.wikipedia.org/wiki/Catherine_Palace">Catherine Palace</a> in a suburb (impressively restored post-WWII)</li>
<li>
<p>the <a href="https://en.wikipedia.org/wiki/Church_of_the_Savior_on_Blood" title="Church of the Savior on Spilled Blood">“ice cream church”</a> (and its amazing mosaic interior)</p>
<p><img src="/images/2014/spb-icecream.jpg" alt="church" /></p>
</li>
<li>the Peter and Paul Fortress in the center of the city</li>
</ul>
<p>… and some things I likely wouldn’t have experienced on my own:</p>
<ul>
<li>
<p>the <a href="https://en.wikipedia.org/wiki/Saint_Petersburg_Metro">metro</a>, unusually deep partly because of the unstable soil</p>
<p><img src="/images/2014/spb-metro.jpg" alt="metro escalator" /></p>
</li>
<li>
<p>unassuming cafés serving good food: soups, <a href="https://en.wikipedia.org/wiki/Blintz"><em>blini</em></a>, <a href="https://en.wikipedia.org/wiki/Pirog"><em>pirogi</em></a>, and so on</p>
</li>
</ul>
<p>… all very cheaply by Western European standards.
The weather was wonderfully sunny and warm all weekend.</p>
<p>In a word, my taste of St. Petersburg was one of <em>grandeur</em>—everything from the museums to the metro done in a large and ornate fashion. I don’t know how much this reflects the influence of Russian values relative to that of European (particularly Italian) ones.</p>
<p>The tour company was founded by students, the tours are led by local St. Petersburg students, and exchange students are the primary audience—I made friends with Slovakians, Italians, other Americans, and more within our group on that fun and friendly adventure.</p>
Time for a change of courses2014-03-12T00:00:00+00:00http://coreyford.name/2014/03/12/courses<p>The first study period of the KTH semester is coming to an end, and with it my first pair of technical courses. Final class meetings were held last week, including some project presentations. This week, I’m finishing up some more project work and preparing a bit for next week’s exams. After that, the next study period begins (although I’ll squeeze a short trip in between!)</p>
<h2 id="the-courses">The courses</h2>
<p>One of the courses I took this study period was on Developing Mobile Applications. It covered many aspects of mobile application design (field studies, prototypes, user testing), development (mobile web apps, Android apps, use of web services), and deployment. In the course project, which was a good exercise in team-based software engineering, my team ultimately developed an Android application that provides information about the Stockholm public transportation system.</p>
<p>The other course, Programming of Interactive Systems, provided a good introduction to network programming, distributed systems, agent-based software design, and similar topics. Its two projects involved a client/server chat system and a game of Tag played by mobile agents on a playing field potentially spanning multiple computers—very interesting software models to work with!</p>
<h2 id="in-comparison">In comparison</h2>
<p>As I <a href="/2014/01/25/stockholm-first.html#school">mentioned previously</a>, I’ve found the week-to-week workings of these courses similar to what I’d expect in an upper-division course at Cal Poly: mostly PowerPoint lectures with the occasional student question, plus (in the mobile applications course, anyway) some time for student presentations and supervised work.</p>
<p>The grading structure is slightly less familiar. Swedish higher education seems more reliant on using a single course exam to judge proficiency, and so even in these two project-heavy courses, the projects themselves are pass/fail graded and account for less than half of the course credits.</p>
<p>I’m not sold on the calendar system either—while 10-week quarters are fast-paced, 7-8 weeks starts to just feel rushed. (True, one is only juggling 2-3 courses during that period rather than 3-5, though by the credit conversions each course is worth 40% more.) This one-week break between lectures and exams is nice to relieve some of that pressure, though.</p>
<p>The ICT School has good connections with industry, much as the Cal Poly Computer Science department does. The Kista campus is adjacent to tall office buildings in a <a href="https://en.wikipedia.org/wiki/Kista">technology hub</a> sometimes thought of as “Sweden’s Silicon Valley”, and I’ve heard plenty of reference to academic collaborations with the likes of Ericsson, Telia, and Spotify.</p>
<p>Overall, I think my Cal Poly education prepared me well for these courses. Indeed, I gravitated towards these over more traditional lecture/exam-heavy alternatives because of my experience with software engineering-centric coursework.</p>
FOSDEM 2014 Recap2014-02-06T00:00:00+00:00http://coreyford.name/2014/02/06/fosdem<p><img src="/images/2014/fosdem-welcome.jpg" alt="Janson at 10:30 Saturday" title="Janson at 10:30 Saturday" /></p>
<p>I was happy to be able to squeeze in a short trip to attend <a href="https://fosdem.org/2014/">FOSDEM 2014</a> in Brussels last weekend. With several thousand attendees, FOSDEM is one of the largest free/open source software conferences.</p>
<p>Here’s a summary of how I spent my <a href="https://fosdem.org/2014/schedule/">time at the conference</a>. (What little I saw of Brussels itself was lovely, and a bit warmer than Stockholm.)</p>
<h2 id="saturday">Saturday</h2>
<p>I arrived on the <a href="https://fosdem.org/2014/practical/transportation/">ULB campus</a>, after a very crowded bus ride, just in time for the <a href="https://fosdem.org/2014/schedule/event/keynotes_welcome/">Welcome to FOSDEM 2014</a> talk. Then I stayed in the same room for the next two <em>Keynotes</em>:</p>
<ul>
<li><a href="https://fosdem.org/2014/schedule/event/how_we_found_600000_grammar_errors/">How we found a million style and grammar errors in the English Wikipedia</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/software_archaeology_for_beginners/">Software Archaeology for Beginners</a> (with some good advice for joining an open source project)</li>
</ul>
<p>Next I went to check out the near-capacity <em>Mozilla</em> devroom, and saw short talks on
* <a href="https://fosdem.org/2014/schedule/event/state_of_firefox_os/">State of Firefox OS</a>
* <a href="https://fosdem.org/2014/schedule/event/persona/">Mozilla Persona</a></p>
<p>After that it was time to grab lunch and join a nice little <a href="http://coord.info/GC4V7ZQ">geocaching meetup</a>.</p>
<p>I considered returning to the Mozilla devroom, but realized I was already somewhat familiar with the current Mozilla projects. Instead I went to see some <em>Lightning talks</em>, where I learned about a few interesting projects:</p>
<ul>
<li><a href="https://fosdem.org/2014/schedule/event/kernel_llvm/">The Linux kernel on dragon wings: Compiling the Kernel with LLVM/clang</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/syscall/">Software engineering tools based on syscall instrumentation</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/listaller/">Listaller: A simple and secure way to distribute 3rd-party applications</a> (the topic of distribution-independent packaging was also well-represented on the <em>Distributions</em> devroom schedule, and in the MediaGoblin talk I attended later)</li>
<li><a href="https://fosdem.org/2014/schedule/event/sozi/">An overview of Sozi: SVG-based zooming presentation software</a> (a nice approach to Prezi-like presentations)</li>
</ul>
<p>Then I did go back to the <em>Mozilla</em> devroom, to see Bas Schouten (who I was acquainted with from last summer) give a nice talk on <a href="https://fosdem.org/2014/schedule/event/graphics_in_gecko/">Utilizing GPUs to accelerate 2D content</a>.</p>
<p>I ended my day in the <em>Legal and policy issues</em> devroom. Christopher Allan Webber of <a href="http://www.mediagoblin.org/">GNU MediaGoblin</a> spoke on <a href="https://fosdem.org/2014/schedule/event/network_freedom/">The road ahead for network freedom</a>; I think this is one of the most important computing issues today, and I’m glad MediaGoblin and others are doing the hard work to create alternatives to centralized services. I stayed for an <a href="https://fosdem.org/2014/schedule/event/governance_round_table/">Open Source Governance best practices roundtable</a>.</p>
<h2 id="sunday">Sunday</h2>
<p>I got an early start (and in doing so, beat the worst of the bus crowds) in the <em>Graph processing</em> devroom, with</p>
<ul>
<li><a href="https://fosdem.org/2014/schedule/event/intelgraphbuilder/">Graphbuilder</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/graphdevroom_structr/">From 0 to a complex webapp in 30 minutes</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/graphdevroom_graphhopper/">Fast and Memory Efficient Road Routing with GraphHopper</a> (which looked surprisingly simple, fast, and effective)</li>
<li><a href="https://fosdem.org/2014/schedule/event/graphdevroom_ldbc/">The LDBC Social Graph Data Generator</a></li>
</ul>
<p>Then I headed to the <em>Internet of things</em> devroom for</p>
<ul>
<li><a href="https://fosdem.org/2014/schedule/event/deviot05/">Federating Access to IoT using OAuth</a></li>
<li><a href="https://fosdem.org/2014/schedule/event/deviot07/">XMPP in the world of IoT</a></li>
</ul>
<p>After getting a tasty <a href="http://www.justlikeyourmom.com/catering/index.html">vegan lunch</a>, I went to a talk on the <em>Security</em> track: <a href="https://fosdem.org/2014/schedule/event/use_otr/">USE OTR or how we learned to start worrying and love cryptography</a>.</p>
<p>Then it was time for the <a href="https://fosdem.org/2014/keysigning/">PGP keysigning event</a>. This means I traded IDs with 100+ other people (!), so that we can now all digitally vouch for each others’ identities.</p>
<p>The keysigning took the better part of two hours, leaving time for just one more talk before I needed to head back to the airport; I chose to go back to the <em>Legal and policy issues</em> devroom for a short discussion on <a href="https://fosdem.org/2014/schedule/track/legal_and_policy_issues/">Licensing Models and Building an Open Source Community</a>.</p>
<p>It was a fun and very busy weekend!</p>
Stockholm First Impressions2014-01-25T00:00:00+00:00http://coreyford.name/2014/01/25/stockholm-first<p><img src="/images/2014/rosenlundsparken.jpg" alt="Rosenlundsparken" title="Rosenlundsparken" /></p>
<p>I’m spending a semester studying at the <a href="http://www.kth.se/en/ict">School of Information and Communication Technology</a> at <a href="http://www.kth.se/en">KTH Royal Institute of Technology</a> in Stockholm, Sweden. I arrived early last week and have been adjusting to the timezone, weather, culture and academics since; here are some initial thoughts.</p>
<h2 id="life">Life</h2>
<p>A bit of snow and below-freezing temperatures arrived in town shortly before I did. Coming from California’s current warm drought, this was a bit of a shock to experience, but so far I’m staying warm enough.</p>
<p>It’s fascinating to hear (starting in the airport) the sounds of foreign languages. Here, I can get by speaking only English, though as signage is mostly Swedish-only, supermarket labeling and laundry instructions have presented small puzzles.</p>
<p>An efficient—in particular, extensive and frequent—public transit system like Stockholm’s is of course wonderful. When trains and buses run every 5-10 minutes, I can almost stop worrying about catching a specific one, and instead just allow a sufficient time buffer to reach my destination.</p>
<h2 id="school">School</h2>
<p>Most courses at KTH operate on a half-semester study period schedule: about 8 weeks plus exams, even faster-paced than Cal Poly’s quarter system!</p>
<p><img src="/images/2014/forum.jpg" alt="Forum in Kista" title="Forum, Kista" />{.pull}</p>
<p>This period, I’m taking two technical classes, which had their first few meetings this week. One has a sizeable lecture of around 50 students, while the other has only 8 in total. I chose relatively project-heavy classes, and we’re already delving into the first assignments.</p>
<p>These courses are held at the KTH campus in <a href="https://en.wikipedia.org/wiki/Kista">Kista</a>, a quieter suburb about 40 minutes by metro from my apartment.</p>
<p>The Master’s programs at KTH are conducted in English, and have very strong international student enrollment. Indeed, I’ve met very few native Swedish students so far (though I’m sure it doesn’t help that among themselves they converse in Swedish).</p>
<p>I’m happy to find the classroom environment friendly and relaxed, hardly unlike what I’m used to.</p>
<h2 id="fun">Fun</h2>
<p>The KTH student union has organized a lot of fun introductory activities that have helped get me out of my apartment this week, including</p>
<ul>
<li>
<p>a tour of the main campus</p>
<p><img src="/images/2014/ths-tour.jpg" alt="KTH campus tour" /></p>
</li>
<li>
<p>ice skating downtown</p>
<p><img src="/images/2014/ths-skating.jpg" alt="Kungsträdgården ice skating" title="Kungsträdgården" /></p>
</li>
<li>
<p>an international potluck dinner</p>
<p><img src="/images/2014/ths-potluck.jpg" alt="International Dinner" /></p>
</li>
</ul>
<h2 id="next">Next</h2>
<p>Coming up next week: the start of my introductory Swedish class, and a trip to the <a href="https://fosdem.org/2014/">FOSDEM</a> conference in Brussels!</p>
Successfully dual-booting Windows 8 and Linux Mint 15 on UEFI2013-10-05T00:00:00+00:00http://coreyford.name/2013/10/05/linuxmint-uefi<p>Today’s CPLUG <a href="http://cplug.org/2013/09/29/fym-fall-2013/">Free Your Machine</a> brought new challenges in the form of
UEFI laptops with Windows 8. (On the plus side, though, GPT means no more
worries about already having 4 OEM-created partitions).</p>
<p>First, all Windows 8 systems needed <a href="http://www.typicaltips.com/2013/02/disable-fast-startup-in-windows-8.html">fast boot</a> disabled. Then we needed to
disable Secure Boot. Some firmware setup utilities were more cooperative than
others, and in several cases we had to just recommend installing Linux in a VM
(since <a href="http://www.ubuntu.com/download/desktop/windows-installer">Wubi</a> doesn’t support UEFI).</p>
<p>Finally, on two laptops (an HP Envy and a Toshiba Satellite), Linux Mint and
GRUB would install correctly but the machine would still boot directly to
Windows, and there was no firmware setup option to specify the path to the
<code>grubx64.efi</code> file. I ended up getting these to boot to GRUB, then to either
Linux Mint or Windows 8, as follows.</p>
<p><em>Disclaimer: I’m reconstructing these commands from memory a few minutes after
the fact, so no guarantees they’re exactly correct, much less that they will
work on any other system.</em></p>
<p>Boot to a Linux LiveCD/USB again and mount the EFI partition, then move the
Windows <code>bootmgfw.efi</code> aside and replace it with a copy of GRUB’s
<code>grubx64.efi</code>:</p>
<pre><code># mkdir efi
# mount /dev/sda2 efi
# cd efi/EFI/Microsoft/Boot/
# mv bootmgfw{,-real}.efi
# cp -a ../../linuxmint/grubx64.efi bootmgfw.efi
</code></pre>
<p>Now on boot, GRUB should run and start Linux Mint. From the installed system,
add an entry to GRUB that chainloads Windows via the moved-aside file by
adding the following to <code>/etc/grub.d/40_custom</code> (adapted from
<a href="http://askubuntu.com/a/216254">here</a>):</p>
<pre><code>menuentry "Windows 8" --class windows --class os {
insmod part_gpt
insmod chain
set root=(hd0,gpt2)
chainload /EFI/Microsoft/Boot/bootmgfw-real.efi
}
</code></pre>
<p>then run <code>update-grub</code> to regenerate the configuration. With any luck, GRUB
will now offer a choice between Linux Mint and Windows 8, and both will work!</p>
Mozilla Internship Reflections2013-09-16T00:00:00+00:00http://coreyford.name/2013/09/16/mozilla<p><img src="http://coreyford.name/images/2013/embarcadero.jpg" alt="Embarcadero from Pier 14" /></p>
<p>Last week, I wrapped up a summer internship at <a href="http://www.mozilla.org/">Mozilla</a>, on the Gecko
Rendering (Layout/Graphics) team. I worked out of Mozilla’s <a href="http://www.openstreetmap.org/?mlat=37.7895&mlon=-122.3891#map=15/37.7895/-122.3891">San Francisco
office</a> (visible towards the left of my picture above), a
beautiful space <a href="http://www.flickr.com/photos/robhawkes/6967667745/">overlooking the San Francisco Bay</a>.</p>
<h2 id="the-work">The Work</h2>
<p>My main <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=886646" title="bug 886646: implement position:sticky">project</a> for the summer was implementing CSS <a href="http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit" title="Stick your landings! position: sticky lands in WebKit">sticky
positioning</a> in the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Gecko">Gecko</a> rendering engine, which forms the core of
Firefox. I gave a short <a href="https://air.mozilla.org/intern-presentation-ford/">presentation</a> on the topic in my second-to-last week
(<a href="http://coreyford.name/files/position-sticky-presentation/">slides here</a>):</p>
<p>This turned out to be a great internship project, being</p>
<ul>
<li>
<p><strong>summer-sized:</strong> manageable within 3 months (starting from scratch) but
complex enough to take most of that time</p>
</li>
<li>
<p><strong>relatively independent:</strong> not intimately linked to anyone else’s summer
work, so I was able to take the lead myself</p>
</li>
<li>
<p><strong>useful, but not release-critical:</strong> Gecko developers and web developers
have been interested in this feature for a while, but there were no solid
deadlines in anybody’s mind</p>
</li>
</ul>
<h2 id="lessons">Lessons</h2>
<p>This was really my first time working on a software development project on the
scale of Firefox, and I certainly learned some things along the way:</p>
<ul>
<li>
<p><strong>There are many ways to solve a problem.</strong> Unlike with carefully
constructed school assignments. At the same time, one can have a reasonable
intuition about which approaches are (more or less subjectively) better.
Several pieces of code I developed went through multiple stages of
refactoring as I (and my code reviewers) tried to improve on that.</p>
</li>
<li>
<p><strong>Existing code is not sacred: be bold.</strong> More than once I’ve been reluctant
to add a new field to some existing class just to solve my small use case.
Often that type of structural modification can be the simplest solution, and
nobody is particularly attached to the details of the existing design.
However, there is still lots of wisdom in code and people that have been
around much longer than oneself.</p>
</li>
<li>
<p><strong>Documentation is often not the best way to understand code.</strong> The Gecko
codebase actually has fairly good inline documentation, and also plenty of
wiki pages/blog posts/presentations giving higher-level overviews. Even
still, I spent quite a lot of time during the first month of my internship
trying to wrap my head around the machinery that is the 200,000+ lines of C++
in the <code>layout</code> directory. I probably should have bothered people with more
questions as I went, but it wasn’t until a couple weeks in that I could ask
anything very intelligent. After that point, conceptual questions were
usually best answered by another person with experience in the relevant code.</p>
</li>
</ul>
<h2 id="people">People</h2>
<p>The people I worked/had lunch/chatted with over the course of the summer were
wonderful—committed to <a href="https://www.mozilla.org/en-US/about/manifesto/" title="The Mozilla Manifesto">what they do</a> while being incredibly
down-to-earth and friendly. Even though I chose Mozilla in part for the
project’s philosophy, this amazing culture exceeded my expectations, and has
set a high bar for my future job searches. While my <a href="http://dbaron.org/" title="David Baron">mentor</a> and
several others from my team sat close to my desk in San Francisco, towards the
end of my internship I ended up working more with people based in Mozilla’s
Auckland and Toronto offices (via IRC and Bugzilla).</p>
<p>Also, the awesome “intern herding” team did a great job of keeping an eye out
for all the interns, organizing fun events, and really fostering community—I
know I’ve made some good friends who I’ll keep in touch with.</p>
<h2 id="city-life">City Life</h2>
<p>Although I grew up in the Bay Area, I had never spent much time in San Francisco
before this summer. But I knew enough about the housing market to happily accept
Mozilla-sponsored housing within a 10-minute walk (!) to the office.</p>
<p>San Francisco is a friendly and wonderfully quirky city. But I learned that
downtown big-city life is not quite for me. I’m not sure whether it’s just the
constant noise and bustle of Market St, or the difficulty of really escaping to
nature (Golden Gate Park doesn’t quite cut it), or some combination of those
and more, but the balance shifted from exciting towards stressful as the summer
went on.</p>
<p><strong>All in all, an excellent way to spend my summer. Thanks to everyone who made
it possible!</strong></p>
GitHub Language Correlations, Revised2013-04-13T00:00:00+00:00http://coreyford.name/2013/04/13/github-language-correlations<p>Akshay Shah recently published <a href="http://datahackermd.com/2013/language-use-on-github/">a correlation matrix between popular languages
on GitHub</a>. As commenter
“conjugateprior” observed, however,</p>
<blockquote>
<p>I’d guess your correlation routine only works with complete cases a.k.a
‘listwise deletion’. That means a bunch of your correlations are based on
very small numbers of cases and will be super noisy. For example, the R to
ActionScript correlation is 0.49 (and I can replicate it in R) but it depends
on exactly 6 Github users. And the reason there are so few complete cases is
that people <em>don’t</em> tend to use these languages together.</p>
</blockquote>
<blockquote>
<p>Sorry, to be a bit clearer: In your data preparation (and for all I know in
the original data) when user does not use a particular language you represent
it as missing data, which the correlation routine duly throws out. In fact
these should be zeros, which makes a huge difference. If you put the zeros
back in the R / ActionScript columns then the correlation is -0.0038. Pretty
much where we might expect to be.</p>
</blockquote>
<p>With <a href="https://gist.github.com/coyotebush/5379476">minor revisions to the code</a>,
I included those zeros and regenerated the plot:</p>
<p><img src="/images/2013/spearman_language_correlation.svg" alt="GitHub Language Correlations" /></p>