This Week I Learned (2016-05-18)

This Week I Learned (2016-05-10)

  • I’m better at adding things to my #TWIL file in Simplenote than I am at actually blogging about them.
  • If an input field’s font size is >= 16px, phones won’t automatically zoom in when a user focuses on the field.
  • Closures, via the JavaScript class I’m taking this semester, Preethi Kasireddy’s article in the freeCodeCamp channel on Medium, and the MDN reference. Key ideas so far: “an important use of closures: to maintain a private reference to a variable in the outer scope”; “you can use a closure anywhere that you might normally use an object with only a single method.”
  • In 1915, the New York Philharmonic had to issue a public notice asking concertgoers to refrain from knitting during the performance.
  • How to get data from the Digital Public Library of America API: particularly proud of this one because I helped write and edit this API’s documentation several years ago as part of my role as the senior project manager for the DPLA at the Berkman Center. I used it to build DPLA Images, an interface for searching the library for image records.

DPLA Images

This Week I Learned (2016-03-23)

Batching several weeks’ worth of learning into a single post because I was too busy having fun in Kansas (*happy dance, again*) to post.

  • The difference between prototypical and class-based object oriented programming languages (at least at a surface level): objects in prototypical languages (like JavaScript) are derived from other objects, and can become prototypes for other objects. In class-based languages (like PHP), you define a class, and then create objects that are instances of that class.
  • Inside a JavaScript constructor function, variables and functions declared directly are private. Variables and functions declared using this are public (or privileged—see Douglas Crockford’s “Private Members in JavaScript” for more).
  • In JavaScript, innerHTML can’t be appended—you can use += to append new content, but the end effect is to rewrite/reload all content within innerHTML on the page, rather than to tack on new material.
  • JavaScript has 12 types of nodes. Each has a number. Elements are 1, text nodes are 3.
  • The global context in JS is (in web browsers) the window object.
  • I liked this history of JavaScript (and JScript and ECMAScript).
  • I’m looking forward to installing a few of these Sublime Plugins—I use Bracket Highlighter and Color Highlighter all the time, and I have Emmet installed but keep forgetting to use it. SublimeCodeIntel and AdvancedNewFile sound particularly helpful.
  • How to tear down a deck, what a tiller is and how to use it, and how to lay weed barrier fabric: much landscaping work was done in Kansas last week.
  • Lunch at Blue Nile in Kansas City’s City Market last week reminded me that I need more Ethiopian food in my life.
  • You can totally make a Dutch baby in a 9×13 pan. Wishing I had known this for the 26 years of life when I didn’t own a cast iron skillet.

This Week I Learned (2016-03-09)

  • I’ve been playing around with HackerRank a lot this week, and as I result I’m becoming more familiar with a wider set of functions (things like array_sum() and substr_replace()). Programming languages are languages, and this is a good way to drill vocab.
  • $array[] = $value; is the same as array_push($array, $value)
  • It’s entirely possible to book a trip to Belize with a few clicks: tickets and beachside bungalow were secured in a matter of minutes today.
  • Kansas City apparently has quite the coffee scene. Looking forward to checking it out this weekend when I go to Kansas (*happy dance*).
  • I finished all of Mystery Show’s first season last week and am now getting into the Myths & Legends podcast. Favorite episode so far: Thor’s fake wedding to a giant.

This Week I Learned (2016-03-03)

Not much—I was sick all week and spent most of my time sleeping/migraine-ing/coughing.

I did experiment with SASS, though—I’d dabbled a bit previously, but not seriously. Verdict: four stars.

I also discovered Mystery Show, Starlee Kine’s podcast on solving mysteries that are less true crime, more “how tall is Jake Gyllenhaal?” It’s excellent.

This Week I Learned (2016-02-23)

King Arthur Flour Danish classThis weekend, I took my first ever class at King Arthur Flour. You may notice a distinctly pastry-oriented slant to this week’s TWIL.

  • Adding salt to an egg wash helps break down the albumen, making it less gloppy.
  • High-fat butter (83% or higher) is the best for making laminated dough: it’s more pliable and less likely to fracture/tear the dough.
  • You can make Danish/croissants/puff pastry with shortening, but you’ll get a less crispy, less caramelized, less flaky, more tender result because you’re using 100% fat, which doesn’t have the water content necessary to create steam and puff up during baking. Also, shortening lacks the necessary milk proteins to brown.
  • How to upgrade OpenSSL on a Mac, which isn’t strictly necessary for security reasons, but is helpful to avoid warnings from other open source tools (like Composer).
  • The array.length property in JavaScript doesn’t give you the length of the array. That would be…too easy? Instead, it gives you a number one higher than the max index in the array.
  • I wrote my first piece of code in PHP using regex (to extract a bunch of words from HTML lists). I also wrote another, better piece of code to do the same thing using the PHP DOM, which I am so glad I now know is a thing. Along the way, I stumbled across this, which I will leave there to remind myself never to try to parse HTML with regex again.

This Week I Learned (2016-02-16)

Last week I stumbled across a post by Diana Kimball on Medium, encouraging readers to “Write About What You’ve Learned Lately.” It was good timing—I’m taking two web development classes this semester and TA-ing for a third, so I’m happily up to my ears in learning about some of my favorite things. In the spirit of, as Diana writes, “celebrat[ing] the process of learning itself, implicitly inviting others to do the same,” here’s my first edition of This Week I Learned (TWIL):

  • Soy sauce, rice vinegar, honey, and sriracha make a pretty good salad dressing, especially if you’re searching for something to go with leftover baked tofu, mixed greens, shredded carrot, and slivered red onion.
  • The countifs function in Google sheets or Excel will let you count the cells in a range that match a certain criterion—and here’s the cool part—if a cell in another range matches a different criterion. Magic.
  • Giant rabbits are real, and can weigh over 20 pounds.
  • The differences between Number(), parseInt(), and parseFloat() in JavaScript. Specifically:
    • Number() handles Booleans appropriately; parseInt() returns NaN
    • parseInt() returns the first number if multiple numbers are separated by spaces; Number() returns NaN
    • parseInt() can take a second parameter specifying the radix (base: i.e., 16 for hexadecimal or 8 for octal). Number() can’t take a second parameter, but automatically assumes:
      • hexadecimal for numbers starting with 0x
      • octal for numbers starting with 0 (note: as of ECMAScript 5, parseInt() *should* interpret these automatically as decimal, rather than octal, if not given a radix parameter, but browsers haven’t caught up yet, so you should always specify a radix when using parseInt())
  • How to use scope to associate table headers with data

A Song for Kansas Day

"peacock storm reflection" by David DeHetre on Flickr (CC BY-NC)

peacock storm reflection” by David DeHetre on Flickr (CC BY-NC)

Wandering children of Kansas away,
 By mountain, by desert, or sea,
Feasting or fasting, at prayer or at play,
 Whatever your fortunes may be,
Open the doors of your hearts to the breeze,
 Prairie wind never are still,
Hark to the surf in the cottonwood trees,
 The breakers that boom on the hill.
Open your soul’s windows–let in the sun–
 The prairie sun gay with delight.
Where’er your wandering pathways have run,
 Come home tonight.

Come home where Kansas lies under the stars
 Twinkling back beauty and joy;
Come and let homely love poultice your scars,
 Leave off your restless employ.
Come home where summer winds billow the wheat,
 Where golden tides cover the sands;
Come–let your heart’s longings hasten your feet
 And home love unfetter your hands.
Come where the tawny sunflower eagerly bends
 A tawny frank face to the light,
So do our hearts seek the joy of old friends–
 Come home tonight.

— William Allen White, “A Song for Kansas Day” (1915)

100 Books in 2014: I made it to 94.

I tracked every book I read in 2014, fairly certain I would reach my goal of 100 without too much trouble. I made it to 94, which is both galling and inspiring (how much reading will I be able to do this year, now that I’m not planning a wedding in three parts?).

At the end of May I did a midpoint check-in and found that I had already fallen behind. I made an effort to catch up in June and July, but in August I dropped back again. Despite what I consider to be a truly valiant effort in November (yay, vacation reading), I never quite managed to catch up:

2014 Monthly Book Count

November also saw my greatest page count, clocking in at just over 6200 pages. Coincidentally, it was also the month I reread all of Harry Potter.

2014 Monthly Page Count

Fiction and memoir continue to be my favorites genres, though despite my pretensions to “literary fiction” earlier this year, around a fifth of the books I read this year fell into the young adult camp. See: Harry Potter, obviously, though also Charlie N. Holmberg’s wonderfully creative The Paper Magician and The Glass Magician.

2014 Genre

Also despite earlier pretensions: my attempts at reading books by a diverse set of authors failed pretty miserably. While more than half of the authors whose works I read were women, only ten percent were people of color, and eight percent people from the global south.

2014 Author Diversity (Total)

I’m disappointed by this, particularly given the many wonderful recommendations I received after I put out a call for help. Looking back at the reading list I made after that post, I’m realizing I only read half the books on the list.

I guess it’s a good thing, then, that I’m giving this another try in 2015. So far I’m one book in—David Mitchell’s Ghostwritten, which I loved—with Pico Iyer’s Falling off the Map: Some Lonely Places of the World on deck. I’m tracking metadata here and a simple list here, in case you’d like to follow along.

100 Books: on deck

I’m thrilled by the amazing recommendations that came in after my call for help in finding books by a diverse range of authors. I thought I’d quickly recap my new and improved reading list (loosely grouped by theme) for those who are interested.

First up is Ron Carlson’s The Hotel Eden, which I’m planning to read tomorrow as part of the 24-Hour Bookclub. If you’re local to Cambridge and want to meet up for an hour or two to drink coffee/tea/a beer and read together, let me know!

Also on the list are a handful of career-related books that have been recommended to me recently by various cool people. These aren’t necessarily hitting the diversity buttons I mentioned in my last post, but I’m excited about them anyway: Susan Cain’s Quiet: The Power of Introverts in a World That Can’t Stop Talking, Cal Newport’s So Good They Can’t Ignore You: Why Skills Trump Passion in the Quest for Work You Love, and Judith Hanson Lasater & Ike Lasater’s What We Say Matters: Practicing Nonviolent Communication.

A couple of other awesome non-fiction books that made it onto the list: Angela Y. Davis’s Women, Race, and Class and Anne Kingston’s The Meaning of Wife: A Provocative Look at Women and Marriage in the Twenty-First Century, which I’m looking forward to picking up at the library this weekend.

A whole slew of memoirs, which are quickly becoming my favorite genre: A Homemade Life and Delancey: A Man, a Woman, a Restaurant, a Marriage, both by Molly Wizenberg; Leah Vincent’s Cut Me Loose: Sin and Salvation After My Ultra-Orthodox Girlhood (opinions on this one are mixed, but it’s a subject area that’s particularly interesting to me); and Jung Chang’s Wild Swans: Three Daughters of China.

And lastly, some wonderfully diverse fiction recommendations: Vaddey Ratner’s In the Shadow of the Banyan, Octavia Butler’s Kindred, Donna Tartt’s The Goldfinch, Kenzaburō Ōe’s A Personal Matter, Tayeb Salih’s Season of Migration to the North, and Ahdaf Soueif’s The Map of Love.

If any of these sound interesting to you, I’d be delighted to bake cookies and chat about introversion / stir up a pitcher of cocktails and sit on the back porch and discuss modern marriage / email back and forth as we work our way through a 700+-page Pulitzer Prize winner. (I think this is what people mean when they talk about “book clubs,” though my approach is…considerably less formal.) Let me know!