PapaParse as a Promise

I’m torso deep in re-writing the Booked front end for the 3.0 release. One of the big improvements will be the incorporation of modern JavaScript tools and patterns to replace the clunky JavaScript that currently handles client side functionality and dynamic rendering.

Most of the admin tools allow for CSV imports for data. I’m now using PapaParse to handle client side parsing of this information. But I really dislike the API where you have to provide callbacks for complete and error methods. So I made it into a Promise. This example is using TypeScript, but is easily translated.

export async function parseCsv(file: File): Promise> {
  return new Promise((resolve, reject) => {
    Papa.parse(file, {
      header: true,
      skipEmptyLines: true,
      transform: (value: string): string => {
        return value.trim();
      complete: (results: ParseResult) => {
        return resolve(results);
      error: (error: ParseError) => {
        return reject(error);

Which means I can now just call

const parsedCSVFile = await parseCsv(file);

What I Should Have Said

Mike Birbiglia is one of my favorite comedians. His effortless mix of storytelling and comedy is something I haven’t seen anyone else be able to pull off.

Throughout his jokes he has a recurring theme where he finds himself in a high-stakes conversation. He builds up the audience with the statement “What I should have said…. was nothing.” It’s an incredibly simple concept to grasp, but incredibly difficult to practice.

This is something I’ve been trying to get better at. I’m chock-full of opinions and thoughts that I share freely and unsolicited at times. Instead, I’m trying to listen more, talk less, and understand before sharing what’s on my mind.

I think this will make me a better manager and will help me better focus on the people around me.

Please, Stop Saying “I Can’t”

I’m as guilty as anyone when it comes to uttering the words “I can’t…”. That’s almost never actually true, though.

Here are some things I know that I can’t do:
I can’t fly by flapping my arms
I can’t speak Mandarin
I can’t eat my weight in Oreos

Here are some things I’ve claimed that I can’t do:
I can’t take a break to eat lunch
I can’t help you find a solution to problem XYZ
I can’t work on your project

The first list contains physical or scientific impossibilities. The second list contains choices. Unless you are locked in a room, we all can take a break to eat lunch. This represents a choice to temporarily stop doing one thing and start doing another.

There are influences that go into all of our choices and there are consequences to all of our choices. By joining a meeting we may be making a choice to skip a phone call or hold off on sending an email. There are plenty of reasons why one activity may be more important than another.

So instead of claiming that you cannot do something, start making your choices explicit. “I can’t take a break” instead becomes “I am choosing not to take a break because task XYZ is more important right now”. Recognize that you have a choice. Decisions are easier when we aren’t held hostage by what we claim we can and cannot do.

PS – The same goes for saying “I have to”. You don’t have to work late. You don’t have to send that email right now. Most of the things we have to do boil down to trade-offs.

Believe me, there is much that you “can’t” do or “have” to do 🙂

Give me a topic for a post!

I have a wide variety of topics that I would love to write about, but I want to hear what you’re looking for.

Do you want articles about using or administering Booked? Do you want to hear about my journey launching Twinkle Toes Software? How about being part of an agile team, or the broader agile software development process? General software development or architecture more your speed?

Leave a comment and let me know what you’d like to see more of on this blog!


It happened. I’ve finally jumped in to the world of blogging. My hope here is to teach, learn and have some fun.

I’m planning on sticking to technical topics, but I make no guarantees. It’s safe to expect a heavy dose of Agile software development, PHP & .NET code, design and tools, and plenty of phpScheduleIt.

You can also follow me on Twitter at @nickkorbel

Finally, please check out BrickHost. They’ve been an incredible partner of my phpScheduleIt project for many years now.