def maxǝʞɹǝᴉɟ; end

never met a *nix system I didn't want to be friends with

A New Concurrency Primitive

No code is more concurrent than code that does not run and then runs all at once, suddenly.

In these modern times, it seems everyone is catching the concurrency bug. At EmberConf 2017, everyone and their elderly friend from down the street named John was talking about ember-concurrency. There were at least 10 talks that were mostly or only about the add-on wunderkind. Furthermore, articles by the author of the add-on have been declaring ember-concurrency as the magic bullet to solve problems you didn’t even know you had. Even Twitter was alight with admiration for this hot new craze.

ember-concurrency is good

Before ember-concurrency, I had to think about things like how to handle failure gracefully and what to do about retrying asynchronous work. I would think about all those things. And then not do them. Because programming is hard and I already spent so much time getting the happy path to work. If the user experienced a network error, that was just their fault for not plugging directly into the Ethernet port outside of Amazon’s data center, like I do. I thought that I shouldn’t have to adapt my applications to workaround every common failure case. But I was wrong. Very wrong. Bad Max. ember-concurrency really saved my bacon. Literally. I used it in the app for my newly-announced startup BaconSaver, which allowed me to launch several requests to grocery APIs, searching for the best bacon prices. Managing all that asynchronous work would have been impossible without ember-concurrency. But it’s still too complex. I have think about concurrency strategies. Should I drop or keepLatest? And then, it has to run code. Ugh. It’s 2017, people. We pretend servers don’t exist now.

But…

I have a Computer Science-related undergraduate degree from an average-ranked public university, so I know what concurrency means. (But I won’t tell you.) Because I definitely know what it means, I am qualified to say that concurrency (and therefore ember-concurrency, a special kind of concurrency) could be a lot better in Ember. As someone who knows what concurrency means, I can tell you that having to run code drastically reduces concurrency, probably. Luckily, I have a solution. I’m announcing in this blog post ember-procrastination. ember-procrastination improves the concurrency story of our Ember apps by optimizing when code gets run.

Did you know?

Did you know that almost no language implements procrastination primitives? Of course, Java offers a ProcrastinationFactory, .NET has System.Enterprise.ProcrastinationServices and Haskell has that powerful Procrastinate monad. However, to date no one has ever implemented anything like this for Ember or JavaScript. Sad.

How to use Ember-Procrastination?

(Check out this demo at Ember-Twiddle)

ember-procrastination introduces a new concurrency primitive called a someday . A someday is a lot like a task from ember-concurrency, but has the special property that it will only schedule and do work when prompted several times. This means that only work the user truly wants done will get completed. But be careful: if you ask too much, it may get mad and cancel work already in-progress. Such truly concurrent code can be finicky. ember-procrastination also leverages the best in lazy code loading technology to ensure that we don’t execute expensive operations until the last possible moment. To do this, ember-procrastination uses an advanced Just-In-Time (JIT) feature present in modern JavaScript: the beforeunload event. When ember-procrastination detects this event, all code that has been previously prompted to run that has not yet been run will run, ensuring that all work is completed. And it all happens concurrently. Amazing.

You can try it today. Simply yarn add --dev ember-procrastination to your project.

Seize The Future, Someday

This revolutionary add-on puts the control back into your user’s hands. Technology does too much for them already anyway. Give your users a chance to go outside and experience nature. Before it all starts on fire.

Max’s Tips for Very Good Air Travel

You may be traveling without even realizing these ten very important things.

These days, I work for a company where I sit in a chair and do complicated brain things. Occasionally, they tell me to go get on a large metal sky bird, or airplane, to sit and not do brain things until I get to another place, where I promptly return to sitting and doing brain things. It’s an exciting life and I am very lucky and happy. I have experienced much of this so-called air travel during the past year or so, so I am sharing some of my tips free of charge, because I am also wonderful and mildly attractive.

Tip #1: Arrive early for the airport.

Airlines are all about timing. To ensure that you are one of the lucky ones who makes it to the plane and does not get eaten by Bernhardt the Senior Flight Attendant, make sure you aim to get there two hours before your flight, but be sure to arrive at a multiple of three and get to the TSA checkpoint on a multiple of five. They are very strict about the timing and will not hesitate to send you to the back of the line. If you’re worried, try to bring your friend Jerry who always ends his sentences with “I am Jerry, I was a Mathsss major”.

Airport

source: upload.wikimedia.org

Tip #2: Stop at the Duty-Free

These days, it’s really rare to find fine products that aren’t covered in shit. The Duty-Free stores at the airport carry only products not covered in shit, so it is a good opportunity to stock up.

Tip #3: Say “Hi” to Sylvester

You will inevitably run into someone from your past on a work flight and it will probably be Sylvester. Be sure to say “Hi” when you see him and then promptly ignore him for the rest of your life. You have given him all you can give. If you acknowledge him later, it will open up a portal to Hell and fill the next 7 years with darkness and despair, so please don’t fuck it up for everyone.

Samsung DVD-C500 DVD Player with HD Upconversion. source: BestBuy.com

Tip #4: Do not bring your Samsung DVD-C500 DVD Player with HD Upconversion onboard

This summer, the FAA banned the Samsung DVD-C500 from all American passenger aircraft, as it poses a serious fire hazard. Do not bring your Samsung DVD-C500 with you when you fly. It will still be at home when you get back and you can return to watching the Season 2 DVD of Reba.

Tip #5: Say no to babies

Sometimes, the airline will offer you to take a baby at the gate. This might seem cool and it might seem fun to get to show all your friends at the bar your cool new baby you got from your Southwest flight, but do not take it. It is another airline trick. Whoever takes the baby has to sit in the baby seat with the baby who also does not like airplanes, probably because it’s parents are the airline. Unfortunately, there’s someone on every flight who takes the free baby and you will be forced to hear their cries “I did not mean to take the baby, waaaaahhhh!”

Tip #6: Do not shout “I LOVE SEAT 5F” from the top of your lungs as soon as you sit down

Obviously, seat 5F is the best of the best when it comes to airline seating and most people know it. However, be really careful and avoid declaring your continuing love for seat 5F at the top of your lungs. It may seem crazy, but some people did not know about seat 5F and not everyone got to be seated in 5F, so shut the fuck up, you lucky little so-and-so, or Bernhardt the Senior Flight Attendant will have your head.

Sky coffee will not look as good, though. source: upload.wikimedia.org

Tip #7: Ask for the hottest coffee available

This is a certified TravelHack™. When the flight attendants come around with beverages, ask for the hottest coffee available on the aircraft. The flight attendants will be impressed with your moxie and will return from the hold with a piping hot pot of coffee, flaming at the top. All of the other passengers will cheer and your legacy will finally be sealed.

Tip #8: Do not eat the peanuts

Do not eat the peanuts, they are a classic airline trap. If you eat the peanuts, you will become Bernhardt’s personal assistant, tasked with playing doubles tennis with him on his private court for eternity, until someone says “Excuse me, do you think it would be okay if I continue using my phone on this flight, I have really important business things to say and I am in first-class”, which will break the spell.

This is what clapping looks like. source: Flickr

Tip #9: Clap Enthusiastically When the Plane Lands

It’s very important that you clap enthusiastically when the plane lands at your destination. It is the only way for the pilot and co-pilot to know that their spell worked and the plane landed successfully. It is also the only way for them to exit their trance without someone obtaining ginger root and four elven toes, placing them directly in the pilot’s mouth, and chanting “Nickelback is a proper musical group and not a community service project”.

Tip #10: Be sure to exit the plane

I know, sometimes it seems hard. The plane is so comfortable, warm, and sponge-like, but you must resist the urge to stay on the plane and take up residence. Only Bernhardt is allowed lodging on the plane and he is not looking for roommates. You must leave the plane.

Favorite Albums of 2015

I know I essentially ended my last blog post with "coming next week/month, part 2 of my top 10 hip-hop albums of all-time" but I'm going to interrupt the flow with a brief list of my favorite albums of 2015. I promise that second part is coming. I have a draft for it sitting unpublished. Next time I'm on a plane, I'll probably finish it. Anyway, here's a list of albums you can use to judge me silently. Or not so, as the case may be.

Favorite Albums of 2015 (fuzzy ordering):

  1. To Pimp A Butterfly by Kendrick Lamar
  2. GO:OD AM by Mac Miller
  3. If You're Reading This Now, It's Too Late by Drake
  4. Summertime '06 by Vince Staples
  5. 90059 by Jay Rock
  6. Couch Potato by Bobby Raps & Corbin
  7. Compton by Dr. Dre
  8. But You Caint Use My Phone by Erykah Badu
  9. B4.DA.$$ by Joey Bada$$
  10. Fetty Wap by Fetty Wap

Honorable Mentions

Most of these were released in 2014 or earlier, but I listened to them a lot in 2015.

  • PRhyme by PRhyme
  • The Grind Date by De La Soul
  • The Pinkprint by Nicki Minaj
  • 2014 Forest Hills Drive by J. Cole
  • Cadillactica by Big K.R.I.T.
  • Oxymoron by ScHoolboy Q

My Hip-Hop Top 5 List

I recently migrated my site over to a new platform I'm building. As part of that, my blog has come with, and by "come with" I mean I deleted my Tumblr(s) and neglected to migrate any of the content because ¯\_(ツ)_/¯. One of the posts I had on my old blog was a post from 2012 or 2013 about my top 5 or top 10 hip-hop albums (my memory is hazy, it wasn't a very well-written post). Needless to say, the past few years have seen a flurry of amazing albums that have definitely knocked off some items from the previous list. I'd like to share an updated list with a few reasons as to why they're on my top 10. These are not necessarily the albums I found most influential, but they are the ones that I will be sharing with any future kids and grand-kids I may have, if a Trump presidency does not leave us in a Fallout-esque post-apocalyptic Hellscape.

1. good kid, m.A.A.d city by Kendrick Lamar

I feel like this is one of those albums that is assumed to be on every hip-hop fan's top 10 list (and for good reason). I've listened to this album an uncountable number of times. My Last.fm profile may have a number, but I guarantee that number is off by at least 50. There was a period from around when the album came out (October 2012) to around September or October 2014, where I had probably listened to the full album at least once or twice each week.

For me, the album is the hip-hop equivalent of the TV series Arrested Development in terms of complexity and nuance. Never before have I heard an album with such a well-constructed & complex narrative comparable to that of a great novel. I believe it will have as much cultural significance in the next 50 years as Sgt. Pepper's Lonely Hearts Club Band had in the last 48. It was the first album that made me think "I want to make my baby-boomer father listen to this" because of the importance I place on both the narrative and the musicality. Furthermore, behind all of the lyrical complexity, the production was truly next-level and somehow made it possible for me to listen to it as many times as I did without getting sick of it. There are lots of albums out there with as good or better production, but somehow none of them captivated me the way GKMC has and continues to.

I've elaborated more on this album than I likely will on any other. If I had to pick one track to represent for the whole album, it would be Sing About Me. I hold this album to be important enough that schools should have it as required listening in junior high or high school.

2. Graduation by Kanye West

Most people will probably place My Beautiful Dark Twisted Fantasy at the top of their lists (which is more than fair). However, Graduation occupies a special place in my heart being one of the first albums I really connected with. Graduation dropped when I was in 8th grade, which is a terrible time for anyone. Self-esteem was at a low, and for me, Graduation was the jerry can I stumbled upon in the desert. To this day, no album gets me feeling better when I'm down than Graduation. And no track boosts my self-confidence like The Glory.

But with my ego
I can stand there in a speedo
And be looked at like a fucking hero

How could that not make you feel better every single time you hear it?

3. Mos Def & Talib Kweli Are Black Star by Black Star

This is a near-perfect album. The lyrics intertwine so well with the production. It's a tremendous feat of sonic balance. The narrative is fantastically well-crafted. It's understated and supremely well-delivered. To extract a collection of lines would, I believe, do a disservice to the cohesion the duo so eloquently instilled within their hallowed words. An album of self-empowerment and Black empowerment, it's truly a cultural masterpiece.

4. To Pimp A Butterfly by Kendrick Lamar

Most, if not all, of the reasons for placing good kid, m.A.A.d city where it is apply to To Pimp A Butterfly as well. However, TPAB is not simply a hip-hop album. It's a smorgasbord of my favorite genres, encompassing hip-hop, R&B, jazz, and funk. It feels eclectic, surreal, and sometimes other-worldly.

5. The Black Album by Jay Z

This is my favorite album from Jay. Yes, Reasonable Doubt is better, but The Black Album has so many iconic tracks that routinely bounce their way into my mind, but never stick around long enough to annoy.

Allow me to re-introduce myself
My name is Hov, OH, H-to-the-O-V
I used to move snowflakes by the O-Z

I've entered many rooms as that verse has dropped and it has always helped as a confidence booster. I mean, I'm not HOV, but I do feel like him for a second when I hear that drop.