By Gergely Orosz, the author of The Pragmatic Engineer Newsletter and Building Mobile Apps at Scale

Midi2lua !!top!! 🚀

Navigating senior, tech lead, staff and principal positions at tech companies and startups. An Amazon #1 Best Seller. New: the hardcover is out! As is the audibook. Now available in 6 languages.

The Software Engineer's Guidebook

What's Inside

Part 1: Developer Career Fundamentals

1. Career paths
2. Owning your career
3. Performance reviews
4. Promotions
5. Thriving in different environments
6. Switching jobs

Part 2: The Competent Software Developer

7. Getting things done
8. Coding
9. Software development
10. Tools of the productive engineer

Part 3: The Well-Rounded Senior Engineer

11. Getting things done
12. Collaboration and teamwork
13. Software engineering
14. Testing
15. Software architecture

Part 4: The Pragmatic Tech Lead

16. Project management
17. Shipping in production
18. Stakeholder management
19. Team structure
20. Team dynamics

Part 5: Role-Model Staff and Principal Engineers

21. Understanding the business
22. Collaboration
23. Software engineering
24. Reliable software engineering
25. Software architecture

Further reading: online, bonus chapters

Bonus #1: for Part 1
Bonus #2: for Part 2
Bonus #3: for Part 3
Bonus #4: for Part 4
Bonus #5: for Part 5
See more details for each chapter in the extended table of contents for the book.

# Convert your MIDI file midi2lua my_song.mid --output my_song.lua If you are working in a restricted environment (like a Roblox plugin), you can use a pure Lua MIDI parser. Simply load the binary MIDI file as a string and decode the variable-length values.

Enter —a lightweight utility that acts as a translator between the universal language of MIDI and the elegant simplicity of Lua tables. What is midi2lua ? At its core, midi2lua is a parser/converter. It takes a standard .mid file (or raw MIDI bytes) and converts the event stream into a native Lua data structure.

I use midi2lua to control DMX lights. I draw the "chase" pattern in a MIDI clip (C4 = Red, D4 = Blue), convert it to Lua, and let the script run the light show. No expensive lighting software required. A Simple Example (Love2D) Assume you have a file called song.lua that was generated by midi2lua .

If you are tired of guessing note timings or hardcoding arrays of integers, give it a try. Compose in the piano roll. Code in Lua. Let midi2lua handle the handshake. Have you used MIDI with Lua before? Are you building a rhythm game or a synth tool? Let me know in the comments below.

function love.update(dt) -- Convert real time to ticks (simplified) current_tick = current_tick + (dt * (bpm / 60) * ticks_per_beat)

-- Output from midi2lua { ticks_per_beat = 480, tracks = { { -- Track 1: Piano { tick = 0, type = "note_on", note = 60, velocity = 100 }, { tick = 120, type = "note_off", note = 60, velocity = 64 }, { tick = 240, type = "note_on", note = 64, velocity = 95 } } } } 1. Rhythm Games (Roblox / Love2D) If you are building a Dance Dance Revolution or Guitar Hero clone in Roblox (Luau) or Love2D, timing is everything. midi2lua allows your level designers to compose in FL Studio or Ableton, then drop the exported file into your game’s asset pipeline.

Instead of hardcoding noteOn(60, 100) a thousand times, you feed your MIDI file into midi2lua , and it outputs a table like this:

If you’ve ever built a rhythm game, programmed a generative visualizer, or tried to sync a light show to a backing track, you know the pain of manually transcribing note data. You have a beautiful melody in your DAW (Digital Audio Workstation), but your Lua script just sees a list of numbers.

How to Read the Book

The book is separated into six standalone parts, each part covering several chapters:

  • Part 1: Developer career fundamentals
  • Part 2: The competent software developer
  • Part 3: The well-rounded senior engineer
  • Part 4: The pragmatic tech lead
  • Part 5: Role-model staff and principal engineers
  • Part 6: Conclusion

Parts 1 and 6 apply to all engineering levels: from entry-level software developers to principal or above engineers. Parts 2, 3, 4 and 5 cover increasingly senior engineering levels. These four parts group topics in chapters – such as ones on software engineering, collaboration, getting things done, and so on.

This book is more of a reference book that you can refer back to, as you grow in your career. I suggest skimming over the career levels and chapters that you are familiar with, and focus reading on topics you struggle with, or career levels where you are aiming to get to. Keep in mind that expectations can vary greatly between companies.

In this book, I’ve aimed to align the topics and leveling definitions closer to what is typical at Big Tech and scaleups: but you might find some of the topics relevant for lower career levels in later chapters. For example, we cover logging, montiroing and oncall in Part 5: “Reliable software systems” in-depth: but it’s useful – and oftentimes necessary! – to know about these practices below the staff engineer levels.

Midi2lua !!top!! 🚀

Paperback
  • For most countries, buy the hardcover or softcover from Amazon:
  • Buy on Amazon
  • Other sites to buy it on:
  • Buy directly from the publisher in India; also shipping to Sri Lanka, Bangladesh, Nepal, Bhutan and Maldives:
  • Buy from Shroff Publishers
  • Unable to order the book in your country? Please share details here and I'll aim to remedy the situation.
eBook
Audibook

Translations

The Software Engineer's Guidebook is available in multiple languages:

Midi2lua !!top!! 🚀

The book doesn't ship to my location, or shipping is silly expensive off Amazon.

You should now be able to ask your local book shops to order the book for you via Ingram Spark Print-on-demand - using the ISBN code 9789083381824. I'm also working on making the paperback more accessible in additional regions, including translated versions. Please share details here if you're unable to get the book in your country and I'll aim to remedy the situation.

I'm an engineering manager. Is the book useful to me?

I'd like to think so! The book can help you get ideas on how to help software engineers on your team grow. And if you are a hands-on engineering manager (which I hope you might be!) then you can apply the topics yourself! I wrote more about staying hands-on as an engineering manager or lead in The Pragmatic Engineer Newsletter.

I'm not a software engineer. Is the book useful to me?

I've gotten this variation of a question from Data Engineers, ML Engineers, designers and SREs. See the more detailed table of contents and the "Look inside" sample to get a better idea of the contents of the book. I have written this book with software engineers as the target group, and the bulk of the book applies for them. Part 1 is more generally applicable career advice: but that's still smaller subset of the book.

Midi2lua !!top!! 🚀

# Convert your MIDI file midi2lua my_song.mid --output my_song.lua If you are working in a restricted environment (like a Roblox plugin), you can use a pure Lua MIDI parser. Simply load the binary MIDI file as a string and decode the variable-length values.

Enter —a lightweight utility that acts as a translator between the universal language of MIDI and the elegant simplicity of Lua tables. What is midi2lua ? At its core, midi2lua is a parser/converter. It takes a standard .mid file (or raw MIDI bytes) and converts the event stream into a native Lua data structure.

I use midi2lua to control DMX lights. I draw the "chase" pattern in a MIDI clip (C4 = Red, D4 = Blue), convert it to Lua, and let the script run the light show. No expensive lighting software required. A Simple Example (Love2D) Assume you have a file called song.lua that was generated by midi2lua . midi2lua

If you are tired of guessing note timings or hardcoding arrays of integers, give it a try. Compose in the piano roll. Code in Lua. Let midi2lua handle the handshake. Have you used MIDI with Lua before? Are you building a rhythm game or a synth tool? Let me know in the comments below.

function love.update(dt) -- Convert real time to ticks (simplified) current_tick = current_tick + (dt * (bpm / 60) * ticks_per_beat) # Convert your MIDI file midi2lua my_song

-- Output from midi2lua { ticks_per_beat = 480, tracks = { { -- Track 1: Piano { tick = 0, type = "note_on", note = 60, velocity = 100 }, { tick = 120, type = "note_off", note = 60, velocity = 64 }, { tick = 240, type = "note_on", note = 64, velocity = 95 } } } } 1. Rhythm Games (Roblox / Love2D) If you are building a Dance Dance Revolution or Guitar Hero clone in Roblox (Luau) or Love2D, timing is everything. midi2lua allows your level designers to compose in FL Studio or Ableton, then drop the exported file into your game’s asset pipeline.

Instead of hardcoding noteOn(60, 100) a thousand times, you feed your MIDI file into midi2lua , and it outputs a table like this: What is midi2lua

If you’ve ever built a rhythm game, programmed a generative visualizer, or tried to sync a light show to a backing track, you know the pain of manually transcribing note data. You have a beautiful melody in your DAW (Digital Audio Workstation), but your Lua script just sees a list of numbers.