Friday, December 26, 2014

The Twelve Days of Christmas: Fun with Algebra

If you're like me, after hearing the song "The Twelve Days of Christmas" for the umpteenth time, you start wondering how all those gifts stack up. How many lords-a-leaping do you end up with at the end, anyway? What do you have the most of? And what's the total?

This problem can be solved by a little bit of math no more complicated than multiplication, but this being my blog I'm going to complicate things unnecessarily for fun. Let's call an arbitrary day of Christmas n (where \(1\leq n \leq12\)). The number of gifts given for the first time on that day is then also n (one partridge in a pear tree on the first day, two turtle doves on the second day, etc.). Then the total number of each gift is simply n times the number of times that gift is given. A little thought shows that this number is simply \(13-n\) (a partridge in a pear tree will end up being given on all twelve days, while the twelve drummers will end up being given only once on the twelfth day).

Putting these facts together, we arrive at a function (I'll call it "g" for "gifts") that will give us the total number of gifts of a particular type received, given a day of Christmas as input. Symbolically:
\[\text{g}(n)=n\cdot(13-n)=-n^2+13n\]This is a simple quadratic equation (a parabola, to be exact); I've marked the locations of integer value inputs in the plot below with annotations to show what each one is.


Looking at this plot, we see that the number of each gift begins at a minimum of twelve, rises to a maximum of forty-two for days 6 & 7, and drops off again to twelve on the twelfth day.

This leaves us with the question of how many total gifts you would receive from all this. Luckily, this is very simple: since the number of gifts is symmetrical after the sixth day, we can simply evaluation the following equation:
\[\text{Total gifts}=2\cdot(12+22+30+36+40+42)=364\]which, I think we can agree, is a whole lot of gifts. A hui hou!

Edit (1/16/2016): Of course, what escaped me at the time is that the song is actually about discrete gifts, not continuous ones, and thus trying to represent it as a continuous function as I did above makes pretty much zero sense.

I'd actually originally planned to do some calculus and integrate under the curve where the gray shaded part is and show how it came out to 364 as well…except it doesn't. I couldn't figure out why at the time and thus just sort of ignored it while leaving the talk leading up to the subject intact, leading to a somewhat disjointed blog post. Sometime later I realized that it's because this is a situation where you can't describe something with a continuous function; instead of a parabola, each point should be connected by a straight line—and then the area underneath that collections of points and lines should add up to 364.

Thursday, December 18, 2014

Endings and Beginnings

It's been a little quiet here on the blog front lately as I've been dealing with the passing of my sister Esther a week before Thanksgiving.

Esther had a very rare genetic condition known as Aicardi Syndrome which left her severely developmentally handicapped from birth, and given the severity with which she had it it was really only a question of time (though that's true of all of us, in the end). I don't want to dwell on it as my family is dealing with it and continuing on with life, but I do think an explanation is warranted for this longest-yet break between posts.

Being a naturally cheerful person, I don't like ending a post on a downer note, so here's something I found funny: while back home for the memorial service I picked up one of our new Polish roosters to show a visiting uncle and aunt. My mom happened to have a hair band on hand and decided to put his head feathers up in a pony tail, and the resulting picture was just too funny not to share.


(And to explain the "beginnings" part of the title, I was privileged to be able to attend the wedding of one of my cousins this past weekend.) 

Monday, November 24, 2014

Visiting Lake Waiau

Two weeks ago some friends from work and I took a trip to the summit of Mauna Kea to see Lake Waiau. It's been three and a half years since the last time I saw it, back in February 2011. It was interesting to go back and see my pictures from that trips, since the lake was a bit smaller back then. I've put two pictures from the two trips together below for comparison:

Lake Waiau in February 2011.

Lake Waiau in November 2014 (sorry for the poor quality, only put this up for the comparison).
Interestingly, in between these two photos, the lake pretty much dried up over the summer of 2014. I regrettably never got around to seeing it in that state, but I heard from multiple people that it was little more than a puddle. Mauna Kea got a lot of rain in the last few months, though, due to a few winter storms (and Hurricane Iselle, which dropped a lot of rain).

One thing I noticed while skimming my post from the last trip was that I mentioned the hypothesis I'd read about that Lake Waiau was fed by melting permafrost. Given how the lake dried up over the summer (coinciding with the culmination of a long period of very dry weather both for Mauna Kea and the island of Hawaiʻi), I think we can consider that hypothesis pretty much busted. Looks like it does depend on precipitation after all!

This next picture is a panorama taken from down closer to the lake. It was really peaceful when we got down there, down in the bowl of Puʻu Waiau. It was a beautiful day, blue skies, scattered high clouds, bright sun, gently rippling lake…very idyllic. The peak in the background is Puʻu Poliʻahu, which currently has no telescopes but was the site of the very first telescope on Mauna Kea all the way back in 1964, fifty years ago.

Can you spot the two tourists visible in this picture? (On top of the rim at the far right of the picture.)
I also got a picture of coworker Graham getting his own photos of the lake. I like the composition of this picture.


And a close-up picture of the lake's rippling surface just because I like it:


On the way up the mountain we stopped at the Visitor Information Station to acclimate (as you should), and I took the opportunity to visit the silversword enclosure to see how they were doing. Sometime in the interval between the last time I visited and now a bunch of new seedlings were planted, which were visible all though the enclosure. Some of the mature plants I remembered from last time had grown even larger, and looked even more amazing. Here's one, with a close-up of one of the rosettes below:

A mature silversword plant, with a whole bunch of rosettes.

Close up of one of the rosettes.
They really are amazing plants. Wish I could grow one as a houseplant, but c’est la vie. A hui hou!

Sunday, November 9, 2014

An Abundance of Lei

Well, by “abundance,” I mean “six,” because that's how many complete crochet lei I have lying around at the moment. I'm now finishing one about ever two weeks or so on average.


Some of them are fairly simple, such as the “Rosebud” one on the top right, creating a sparse appearance with the center “stem” easily visible. Others, like the “Hibiscus” one at lower left, have densely arranged petals that hide the stem. It doesn't show up well in this picture, but the two pink ones are actually slightly different shades of pink. The two orange ones used the same color, but are different patterns; the one on the top is a bit sparser than the one on the bottom, though again it doesn't show up well.

I realize, looking at this picture, that some of these lei look rather similar. This is partly because, when I first started crocheting them, I only bought a few colors of yarn that showed up in multiple patterns so I could easily reuse them. I've since bought more yarn in a wider range of colors (the red and pink lei on the bottom were both products of that trip, actually), and I'm planning on doing some with a wider variety of colors in the future. I'm working on one called “ ‘Ola‘a Beauty” at the moment which has dark purple petals and a yellow stem.

Most of the designs are really quite simple in practice, being nothing more than a simple repeated motif which is twisted around the stem to create a (mostly) radially symmetric pattern. The lei in the middle on the top, however, is a different design, and much trickier to pull off.


The book I'm using calls the flower “Mauna-loa,” and instead of radial symmetry it requires a sort of bilateral symmetry which gives it two markedly different sides.


This photo's not the greatest, but you can see how the matched sets of petals emerge on opposite sides of the stem, which itself required a novel, tricky technique to make. Instead of being a simple chain it's more like a flat ribbon, and is the source of the different look of this lei. There's another lei using the same pattern for the stem which also looks pretty interesting, and I plan to get around to it sooner or later.

Since people keep asking me what I'm going to do with all these lei, I want to mention that I've already given away the first three I made while I was visiting family this summer. I also gave away another I'd just finished to my boss, who served as the Associate Director of JCMT for the past two years on loan from the National Research Council of Canada but whose secondment ended at the end of September and had to return to Canada. I'm sure I'll find opportunities to bestow more of them in the future, too. A hui hou!

Tuesday, October 28, 2014

Slice of the Sun

Wow, has it really been nearly a month since I posted last? Part of the reason for this is that the project I've got for this post took me quite a while a do. Two years ago, on a whim, I decided to create a scale model of the earth's interior for myself, and posted it. I got a lot of positive responses to it, and this month I decided to undertake a similar project I've had in mind for some time: doing the same thing, but with the sun.

When I first looked up the sun to do research for this project, I noticed the serendipitous fact that the sun's radius is about 109 times larger than the earth's. This immediately suggested that I decrease the scale by a hundred times, so that one pixel would represent one hundred kilometers instead of a single one. Once again, I've broken the image up into pieces so Blogger would accept them (you can paste them back together seamlessly if you want to), and written most of my commentary in the body of the image itself. Anyway, without further ado, here it is:



I hope you found that as interesting a trip as I did. I'm sorry it took so long for me to get this out there; I was actually all ready to release it over a week ago, only to discover that I'd accidentally used the sun's radius as its diameter and made the whole thing half as large as it should be. Expanding it and finding more facts to fill up all the new space took some time, but I think it's been worth it. Anyway, now that's finally done I can move on to some other projects I have in mind. A hui hou!

Wednesday, October 1, 2014

Twenty months.

It's interesting to see what can happen in two years. Well, more like twenty months in my case. When I accepted the offer of my current job at the Joint Astronomy Centre (JAC) at the end of November 2012, this day, September 30, 2014, was as long as I was guaranteed employment due to the funding agencies in the UK and Canada ending their funding of the JAC to focus on other projects.

Thankfully, a lot can happen in twenty months. Funding from the Science and Technology Facilities Council (STFC) in the UK, the majority funding partner, has been extended through January, when the East Asian Observatory (EAO) is poised to take over management of the James Clerk Maxwell Telescope from the JAC as the JAC officially ends as an organization after three decades of astronomy on Mauna Kea.

I know there's a lot of acronyms for terms that I haven't necessarily discussed much before in those two paragraphs, for which I apologize. I haven't talked about the transfer process much because for much of it there were a lot of unknowns, such as whether it was actually going to happen or not, which meant that it was sort of hush-hush. The good news is that it's now virtually certain that it will happen, and as a result, I continue to have a job with the JAC through at least the end of the year, as well as a job with the EAO when the JAC finally comes to an end.

So yeah. A lot can happen in twenty months. Thankfully, I still have a job that I enjoy, and a continuation of that job even as the telescope I work for changes hands. At the very least, it'll be interesting to see where the next twenty months takes me.

Friday, September 26, 2014

PSA: “Shellshock”

PSA: If you use any form of *nix as your operating system – some form of Unix, Linux, or Mac OS X – and you have the Bash shell installed, you may want to see about updating it. This is because of a newly-disclosed critical vulnerability in it (dubbed by some “Shellshock”) that could potentially allow an attacker to execute arbitrary code with a specially formed attack. (If you're on Windows you're probably ok, unless [possibly] you're using something like cygwin, in which case you're probably tech-savvy enough to look up how to fix it.)

It's quite easy to check if your version of Bash is vulnerable: open up a terminal window and run:

> env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

Should Bash be vulnerable, it'll return:

> env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
> vulnerable
> this is a test

If it's not vulnerable, you should just get back “this is a test” and possibly a warning about Bash ignoring an attempted function definition. If it does return vulnerable, you'll want to see about updating your version of it as soon as possible (most [all?] of the major Linux vendors have released patches, and Apple is expected to do so soon). Basically, instead of a harmless “echo vulnerable” (which just prints the word “vulnerable” to the terminal), an attacker could potentially put a much more harmful command in there, which in the right circumstances could do a lot of damage.

One noteworthy feature of this bug is that it's apparently been around for something like twenty years (Bash is fairly old as software goes), so it's expected to be found in as incredible number of devices, including a large number of the servers that host the World Wide Web.

It's still early yet to see what will come out of this, but it's likely to be a serious security issue for quite some time due to the difficulty of getting everything patched.


(I was feeling creative tonight, though I may have been a bit too literal.)

Edit (9/27/14): I wasn't entirely happy with that version so I went back and played around with it some more and made a few more versions (and learned some useful lessons about Inkscape in the process). Here's the version I currently like the most:

Monday, September 15, 2014

Photo Fun with the Tropical Sun

One fun thing about living in the tropics is how there are days when the sun is directly overhead. When it happens is a function of your latitude, but if you live between the Tropic of Cancer and the Tropic of Capricorn, two days of the year the sun shines straight down around noon (exact time dependent on your longitude).

In Hawaii there's a local term (of comparatively modern origin) for it, Lahaina Noon. Lā hainā means “cruel sun” in Hawaiian (it's also the name of a town on Maui named for its famously dry and hot climate). There's a colorful ancient Hawaiian phrase for the time of noon generally, kau ka lā i ka lolo, an idiom that translated literally means “the sun rests on the brains.”

I unfortunately never seem to get around to actually going out and looking when it happens (in Hilo, the Lahaina Noon days are in May and July), but even now in September the sun still stands very nearly straight up in the sky around noon. I happened to notice the neat shadows it produced on the sign at the Smithsonian Astrophysical Observatory building across the street one day, and decided it was worth a picture:


According to the timestamp, this picture was taken at 12:41:44 PM on September 5th, 2014. In case you can't tell from the picture the letters are small metal shapes protruding out from the wall on little supports, which allows this neat interplay of light and shadow. Just another fun feature of living in the tropics. A hui hou!

Friday, September 12, 2014

Hiking Pololū Valley

Well, as you can see this post is a few days later than I'd originally planned, for which I apologize. Upon arriving at Pololū Valley, we were greeted with this lovely panoramic view:

You really want to click on this one to see it larger.
In this picture, Pololū Valley is on the right. We're now looking back down the coast towards Waipi‘o Valley, although it's around the bend in the coast and can't be seen from here (you'll notice there are some tiny rocky islands further down the coast that couldn't be seen from the Waipiʻo Valley overlook). Here's a smaller picture that focuses on the sea end of the valley:

You can see the flank of Mauna Kea sticking out behind those sea rocks.
As we descended the trail down the cliff face, we'd occasionally get glimpses further back up the valley. I usually avoid putting myself in pictures, but I had Graham take this one:

Hark! A valley! By this time, clouds had come in and were shrouding the head of the valley.
Thankfully the path was well-shaded for most of its length by the verdant overgrowth that hugged the steep walls of the valley like some overgrown moss carpet. From a lower switchback I got this vantage point of the beach:

For some reason this picture looks “cool” to me (as in “not warm”). I think it's all the blue.
And just because I love the view along the Kohala coast so much, here's a zoomed-in picture of it:

Again, that's Mauna Kea peeking out from behind the sea-cliffs there.
I think I can count four more valleys down the coast in that picture, but I'm not sure. A little further down the trail, a great vantage point and lucky break in the clouds gave us this sight:

Looking towards the head of the valley.
Finally, after perhaps half an hour's hike, we reached the beach, made up of moderately-sized rocks further back and gray sand at the water's edge:

Pololū Valley beach. Dangerous to swim at according to the signs, but nice.
You can see the curvature of the horizon! Probably just my lens, actually.
Wandering a few dozen meters inland we found the large pond we'd seen from above. I think this connects with the ocean at high tide, so I suspect it's brackish water. The ancient Hawaiians used to catch fish and raise them in ponds, and they may have done so here.

You can clearly see the clouds hovering at the head of the valley here.

Graham, inspired by the same sight.
Back beyond the beach there was a small forest of some kind of pine tree (at least, it had needles like conifers – I don't know what kind of tree they actually were). They were scattered thinly, and it was quite pleasant to walk in their dappled shade.


Eventually we reached our goal for the day, the southern wall of the valley where the rock once again rapidly rises to tower five hundred feet or more above the valley floor. Some of the cliffs further along the coast are even higher, I believe (among the highest in the world).


From there, along the curve of the beach, we could look back up the coast, which was quite pretty:

Looking back along the beach and up the coast.


That house in the picture at the top of the cliff sits at the trail head near where I took the panorama at the beginning of this post, to give you an idea of the positioning.

All in all, it was a really great hike, and I'm glad I went. It took us a while to drive there and back, but we weren't in a big hurry and it was perfectly doable in a day. The trail in and out was really quite reasonable given the steepness of the cliff face it was descending. And the weather was pretty much as perfect as it could be. Hopefully I'll be able to make my way out there again sometime. A hui hou!

Sunday, September 7, 2014

Getting to Pololū Valley

For Labor Day, me and my friend Graham decided to head to the north part of Hawaiʻi island and hike the trail into Pololū Valley. Pololū (meaning "long spear" in Hawaiian) is the northern-most of the seven major valleys that cut the northeast flank of the extinct volcano Kohala, which sits north of Mauna Kea. On our way, we stopped at Waipiʻo Valley, the southern-most of the seven valleys. These valleys all have very steep walls; there's a 4WD-only road down into Waipiʻo (the only way in other than by sea), but no vehicle roads into any of the other valleys.


This is a panorama I put together from a series of pictures taken at the Waipiʻo Valley overlook, at the end of the valley on its southern side. After stopping there we continued on to the town of Waimea, where we stopped for lunch at a local burger joint called The Village Burger (excellent food!), before continuing up along the road below the ridge of Kohala. The region of Kohala and the northern flank of Mauna Kea have a lot of cowboy culture, and the parking lot had some rather amusing signs:


Driving north from Waimea along the upper highway that runs below and parallel to the Kohala ridge, there's a pretty dramatic demonstration of the rain-shadow effect. Kohala is an old, extinct volcano, the north-east side of which collapsed in a land-slide that left it with a peak ridge running north-west to south-east and created the dramatic cliffs that end so abruptly at the sea as you saw in the first picture.

The prevailing winds in the Hawaiian archipelago come from the north-east, so most of the humid air condenses into rain as it encounters the north-east side of Kohala; very little makes it over to the west side (which is also why Hilo on the east side is wet and Kona on the west is dry). The road runs mostly parallel to the ridge and the line between wet and dry, as you can see in these pictures. As you drive north, on your right you have this view, looking up towards the ridge:


And on your left, running down to the sea on the west side, you see this:


(That's Kawaihae harbor on the shore there. I'm guessing the extreme haziness in the air on this side is vog from Kilauea being blown up around the west side of the island.)

Another cool sight you get to see on a clear day like we had is the vast bulk of Maui rising in front of you. I was actually quite surprised at how different Mauai appears from the summit of Mauna Kea, as that's usually the only place I see it from. The ʻAlenuihāhā channel between Hawaiʻi and Maui is only about 30 miles across, so it's not that far away.


This actually turned out to be a lot more photos of the drive up than I thought, so I'm going to put the photos from when we actually got to Pololū Valley into their post, hopefully up tomorrow. A hui hou!

Thursday, August 21, 2014

Painting

After a June full of clouds and rain, August finally allowed some days of good drying weather that coincided with days I was off work, allowing me to get around to some painting I'd been waiting to do.

The first thing I painted was two small black wooden end tables the previous tenant left behind, which were structurally sound for the most part, but a bit scuffed and worn. I put two coats of high-gloss oil-based black paint on them, with the result that you can now faintly see reflections in their surfaces (they were not kidding about the "high gloss" part!). I also learned that I do not like oil-based paint, as it's formidably difficult to get out of brushes, even with paint thinner.

Next up to be painted was the front porch. Although nearly the entirety of the remainder of the house had been painted while it was vacant, the front porch was highly scuffed between the top of the steps and the door and I'd been itching to slap a good coat of paint on it ever since I moved in. (This paint was a latex-based paint and thus much easier to clean up out of the brush afterwards, thankfully.) Here you can see the two tables atop the freshly-painted deck (note the reflection in the table on the left). There's still blue tape around things because I put a second coat on right after this picture was taken.


It's been several years since I last painted something, and I'd forgotten how soothing it can be. There's something quietly satisfying about watching something be visibly improved as you paint over it, and since I still have a lot of paint left over I may go ahead and paint the fence rails on the porch too (they didn't need it like the floor did, but they'd match a little better).

Monday, August 11, 2014

Hurricanes, Earthquakes, and the Whirlpool Galaxy

Some of you are probably aware that here in Hawaii we just had the first hurricane landfall in twenty-two years. Hurricane Iselle made landfall late Thursday afternoon (although it was downgraded to a tropical storm about the same time), becoming the first hurricane to hit the Hawaiian islands since Hurricane Iniki hit Kaua'i in 1992, and the first cyclonic tropical storm to make landfall on Hawai'i island itself since 1958 (when it was only known as “Tropical Storm Seven”).

For a while it seemed like hurricane Julio might follow in its metaphorical footsteps, but it appears to have swung north and not be a threat anymore. Thankfully, Iselle doesn't seem to have caused any catastrophic damage (in the sense that no lives were lost), although it certainly downed a lot of trees, and a lot of people south of Hilo in Puna suffered power outages (and since most people down there are on their own wells or catchment tanks, losing electricity means losing water too). I came through the storm with only a few flickers of the lights, though I was beginning to worry about the structural integrity of my roof in some of the stronger gusts of wind.

Speaking of gusts, that was probably the part of the storm that surprised me the most. I had assumed that the intensity of the storm would more-or-less smoothly rise, peak, perhaps stay high for a while, then gradually fall. Instead, relatively long periods of calm would be interspersed with periods of torrential rain and howling wind. And when I say calm, it really was quite calm; little or no rain, and the air almost dead still. All in all not what I had expected.

Thinking it over after the fact, this periodic series of heavy weather followed by relative calm put me in mind of the typical appearance of a hurricane, that of a spiral with many arms...in fact, very similar in appearance to something else I know a lot about, spiral galaxies.

The picture below was inspired by an incident at work, where both me and a co-worker independently, upon seeing the picture of hurricane Iselle shown below in the newspaper, remarked that it looked highly reminiscent of a famous spiral galaxy, in this case, Messier 51, also known as the Whirlpool galaxy.


I think it was the long arm of Iselle on the right that put me and my co-worker in mind of M51 (although there's nothing corresponding to M51's little companion galaxy NGC 5195 seen below it).  There are other differences, but I find this comparison of two spirals of such vastly differing sizes appealing.

M51 also hold a special place in my heart for being the location of the very first supernova I ever managed to photograph, a little over three years ago now.

Oh, and to justify the "Earthquakes" in the title, about 6:30 Thursday morning, a scant few hours before Iselle hit, we had a small earthquake (magnitude-4.5 on the Richter scale) up near Waimea. It wasn't enough to wake me (4.5 is just a bit above the threshold it's possible for humans to detect), but our telescope operator on duty noted it (and at first thought it was just someone walking up the stairs to the control room!). As I've said before, life's never dull when you're living on a live volcano in the middle of the mighty Pacific ocean!

Friday, August 1, 2014

Star Trails Over Mauna Kea

One thing about my new computer that I'm enjoying is the fact that the memory card reader works. The memory card reader in my laptop stopped working some years ago, but it wasn't a big enough concern for me to ever bother getting it fixed, as I could still transfer photos off my camera using its USB connection cable. However, as time went on, I found said connection getting worse and worse, making it harder and harder to get photos off my camera. This led to a period where I sort of stopped taking pictures with my camera, relying instead on my phone's camera (which I could still easily get pictures off of).

However, with my new card reader, I can once again easily access the photos I've taken, and I'm looking forward to taking more in the future. For the present, have this one I took back in May when I was sitting up on Mauna Loa waiting for the non-existent Camelopardalid meteors:

Star trails over Mauna Kea. Click to enlarge.
This is looking north from about 11,000 feet on Mauna Loa towards Mauna Kea, soon after sunset. Clouds fill the saddle and stretch as far as the eye can see, leaving the two mountains as dark islands in a sea of clouds. This photo was (I believe) a 30-second exposure, which is why the stars around the edge of the photo have moved and left trails (near the top and slightly left of center you can make out Polaris, about which all the rest of the stars appear to revolve). The light pattern on Mauna Kea is from cars' headlights and taillights as they ascend and descend the great winding access road to and from the Visitor Information Station (note the lack of lights higher than that, towards the observatories). The light in the clouds in the middle of the picture comes from beneath, from the Pōhakuloa Training Camp; I don't know what they were doing that night, but it involved a lot of bright lights flashing under the clouds.

This, unfortunately, was the only good picture I got after setting up before my battery died, as I hadn't gotten to charge it fully. I'd love to get back there sometime (now that I know I can make the drive in my car) and get some more and better pictures. But for now, a hui hou!

Saturday, July 26, 2014

Surprise Observing Run

Wednesday night the observer at the JCMT suffered enough altitude sickness to require coming all the way down from the summit. She thankfully suffered no lasting effects and was up and about the next day, but we at the JCMT were understandably hesitant to let her back on the summit so soon. This led to a scramble to find someone to cover for her shift Thursday and Friday night, and, the normal support scientists being unavailable for Thursday, is how I found myself volunteering and turning a normal workday into an surprise trip up Mauna Kea.

I'm currently writing this post from the control room of JCMT. Given how much trouble I had staying awake back in May -- after spending a day at Hale Pohaku at 9,000 feet to acclimatize and switch my sleep schedule -- I was worried that coming up one day and observing that same night would be even worse, but I've been pleasantly surprised to find that I've been much more awake on the whole (perhaps it was the afternoon nap? the cup of coffee at dinner?). By this point, at 4:30 in the morning, even that wakeful energy is starting to flag a bit, but I think I'll be able to make it through the night without too much trouble. Three and a half hours left to go (roughly)!

Monday, July 21, 2014

Computer Construction Compendium

This past Friday, as I mentioned in my last post, I put my new computer together. I've been collecting parts for it for over two months, and was quite excited to finally build it (I would have put it together a week earlier except a move and a vacation intervened).

It was a fun experience (if a little nerve-wracking at times), and luckily I had the presence of mind to take pictures throughout the build process. For instance, here's everything involved in the build at the beginning of the process:


Here you can see the gaggle of assorted parts I collected. I'm not going to point them out individually as you'll see most of them further on, so I'll just say that on this table you can see the case, the power unit, the CPU, the RAM, the HDD, the SSD, the video card, the water cooler, the optical drive, the card reader, and the additional fan I got. That's a lot to get through, so to start off with here's a shot of the most fundamental part: the case.


Here you can see the interior of the excellent case I found, the Rosewill Thor V2. There are three fans on the front (to the right), the back (to the left), and the top of the case. There's also a fourth fan in the panel that forms the left side which is off in the picture to allow access to the interior. That nest of wires there connects to things on the front panel like the power button, the forward USB connectors, and the headphone/microphone jacks.

After the case, the next most important part of a computer is the motherboard, which serves as the physical and logical connector for all the other parts of the computer.


This particular motherboard is the ASUS Z97-A. There are a lot of slots and connections on it, but it'll be easier to point them out as I add things to them, so let's move on the CPU, which sits in the square socket in the top-middle of the board. The CPU (which stands for Central Processing Unit, hence why it is also sometimes called the processor) is the calculation center of the computer, and the most important factor in how fast your computer is.


The socket actually comes with a little cover on it to protect the pins inside, which you can't see because I forgot to take a picture before putting the CPU in the socket. Instead of putting the pins on the CPU, Intel switched sometime in the last few years to having them on the motherboard, and having the CPU sit gently atop them (held in place by a little spring-arm). Here's what it looks like with the arm down:

I don't think the white lines do anything, I think they're just decoration.

The gleaming square metal surface there is the interface where the prodigious heat modern processors put out is conducted away by some form of cooler to keep them from overheating. The processor I got (the Intel Core i5-4690K, 3.5GHz) comes with a small fan+heat sink that is meant to sit atop the CPU, but  in the warm climate of Hawaiʻi I wanted to ensure that it wouldn't get too hot running some of the games I like, so I got something a little higher-caliber which you'll see later on.

After installing the processor, I installed the motherboard into the case:


With the motherboard screwed into place in the case, I could stand the whole assembly up and access the back of the motherboard to install the necessary infrastructure to attach the cooler for the CPU:


This backplate (which surrounds the CPU on the back of the motherboard) confused me no end for some time, as it didn't seem to fit the holes in the motherboard. I was worried because the manual for the cooler didn't actually say it was compatible with the CPU socket I had, and I was going off somewhere else I'd read it on the Internet. For the record, yes, the Corsair H90 self-contained liquid cooler does work with Intel LGA 1150 sockets; use the sockets marked 1156, and rotate it until the holes line up. That was what had me confused, as I thought it went on straight and spent some time fiddling around trying to get the holes to line up. Anyway, it did finally go in, as you can see. The rest of the cooler sits on the other side, and we'll see it later on.

Anyway, after that, comes the RAM (or Random Access Memory, the short-term memory of the computer):


The RAM is those two white modules there, next to the CPU. I went with two 4GB modules of Kingston HyperX FURY DDR3 RAM for a total of 8 gigabytes of RAM. I don't do a lot of stuff where more RAM would be useful, and I really liked the look of those particular card - they go very nicely with the white case.

After the RAM, I installed the video card - an NVIDIA GTX 750 Ti, by EVGA -


- and the Power Supply Unit (PSU), a KingWin Lazer Platinum Series 550 Watt unit. The "Platinum" in the name says that it has greater than 90% efficiency in certain circumstance (such as when you're using around 50-75% of its maximum rated power). The PSU is a very very important part of your computer - it's the part that provides power at the right voltage and amperage to everything else, and (in theory) takes the fall if you get a power surge. So don't skimp on it. The high efficiency is also nice as that means less power wasted as heat before it even reaches the rest of your parts.



And here are both of them installed in the case and motherboard:


(The video card is a little hard to see, but it's horizontal directly above the PSU.)

After this I installed the optical drive (a simple DVD/CD reader/writer) and the multi-card reader I got into the front of the case. They weren't anything special, so I just took a shot of them installed in the front:



(Optical drive at the top, card reader in the middle.)

I then installed the hard disk drive (HDD) and solid-state disk (SSD) into two of the bays for them:


For the HDD I got a Western Digital 1 terabyte “Blue” drive (a reliable brand, with tons of space), while for the SSD I got a Crucial MX100 512GB drive, which is pretty much the best price-per-gigabyte SSD out there at the time of writing, while still being large enough for what I wanted. My intention from the start was to install my operating system and programs on the SSD for its much faster loading times, while storing large files that don't need to load super-fast like pictures, music, and movies on the HDD. Having set it up like that, I can say that so far it's working well.

Finally, it was time to install the water cooler. This was tricky, because, well...it's probably easier to show you:


This is the Corsair H90 self-contained liquid cooler. The part that I'm holding sits clamped to the top of your CPU and conducts heat from it into water which a small pump circulates through those rubber tubes into the radiator you see lying on the table. It's a bit tricky to install because that "self-contained" term in the name means that it's all one piece.

This is actually a very useful thing, because liquid cooling used to require that you put it together yourself, buying the pump, radiator, and tubes separately and assembling them (and filling them) yourself. You can still do that if you want to get fancy, but when it comes to water and computers there are far too many things that can go wrong, so I opted for the pre-built system where the water is already inside it and never gets a chance to fry sensitive electronic components.

Anyway, despite wishing I had a third hand at times, I managed to finagle the cooler onto the CPU (using that backplate structure we saw near the beginning), and attach the radiator to the fan on the back of the case. Here's what that looks like:


Pretty slick if I say so myself. At the moment I'm not quite done with this, as at the moment the fan in the case is only pulling air through the radiator. I'd like to mount the fan from the first picture on the side you see here to push through the radiator as well, to get the maximum amount of air through to keep things as cool as possible. I didn't have enough screws to be able to do that, but it's just a matter of popping down to Home Depot and picking up the right ones. Luckily, the liquid cooling is effective enough that heat hasn't nearly been a problem, but I've got the fan so I might as well use it.

Anyway, sans that fan, here's a view of the completed build:



(The other side is a bit of a tangled mess of cables, as I wove them back and forth through the holes in the case to keep as few obstructions for moving air in the case as possible.)

Anyway, with that done, it was time to set the peripherals up and try it out (and boy, what a sweet, sweet thing it was to hear the fans begin to spin up and self-test lights begin lighting up the first time I pressed the power button):


And there you have it. I left the side panel off for this shot, but it's now back on so the attached fan can help keep things cool.

And let me tell you, I set out to build a powerful computer that would have no heat problems, and from what I've seen so far, I succeeded. I can measure the temperatures of all four cores in the CPU, and while idling they run about 30 degrees Celsius, which is just a bit warmer than room temperature (86 degrees Fahrenheit). Even after a few hours of playing something like Civilization V that would have my old laptop running too hot to touch within minutes I haven't seen temperatures go above the low 40's Celsius (~100 Fahrenheit), and the air coming out the back from the radiator is only just noticeably warmer than the surrounding air. I wanted to make sure my computer wouldn't overheat in the warm tropical Hawaiian air, and from the looks of things I've done so very well indeed.

I could write at length about the trials and tribulations I had getting my chosen operating system, Linux Mint Debian Edition, running on such new hardware, but suffice it to say that with the help of a friend from work much more knowledgeable than I we got it working after a few hours. I'm now on Linux, and - unlike when I tried it with Ubuntu several years ago - I'm already thinking of it as my main operating system. Again, I could talk a lot about it, but it's getting late so perhaps I'll save it for another post. Anyway, hope that was interesting for any would-be computer builders out there. A hui hou!

Edit (9/14/14): Just realized that I said I got the Western Digital “Black” HDD when I actually got the “Blue” one, which is one step down in performance and good bit cheaper (it's the consumer-oriented version, while the Black is more server- or enthusiast-oriented). I did originally pick out a Black drive before rethinking it and still had it in my notes.

Also, a few weeks after this post went up I finally managed to find the right screws and installed my Noctua 140mm fan in the case to push through the radiator. Check it out:



Noctua's fans' unique brown aesthetic doesn't really go with...well, anything, but but it certainly lives up to its billing as a quiet, high-quality fan. With that, I now have a total of six fans pushing air through this case and keeping it just a smidgen above room temperature.

I also finally caved and bought myself a second monitor (I'm spoiled from having two at work, with the attendant productivity boost it brings). It just makes it so much easier do certain things, especially thing involving photos (have GIMP open on one screen, file manager or browser open in the other, etc.).

I also had some strange experiences which I was able to diagnose as running out of RAM, which caused the computer to freeze. I found this exceedingly odd, as I have 8 GB in this system, the same as my old laptop, and it never had any problems like this. I then learned that Linux doesn't automatically set up a swap space on disk (something Windows does by default), so I was most likely swapping things all the time on the laptop without knowing it. I was able to set up a swap partition on my own (I was so proud!), but I've decided that since I have an extra two slots for RAM I might as well go ahead and bump the system up to 16 GB to allow me to work on large photo panoramas without having to worry so much about running out of RAM