Console #187 - Interview with Mathias Wulff of AlaSQL - a JS SQL Database for browser and Node.js
Featuring RaspAP, Silex, and AlaSQL
🤝 Sponsor
This space is reserved for sponsors that support us to keep the newsletter going! Want to support Console? Send us a note at osh@codesee.io
🏗️ Projects
Browse through open source projects on OpenSourceHub.io, add your project to get more exposure and connect with other maintainers and contributors!
RaspAP
RaspAP is feature-rich wireless router software that just works on many popular Debian-based devices, including the Raspberry Pi.
language: PHP stars: 4145
repo: github.com/RaspAP/raspap-webgui
site: raspap.com
Silex
Silex is a no-code tool for building websites. It also lets you code when needed. It can be used online, offline or in a JAMStack project.
language: TypeScript stars: 1847
repo: github.com/silexlabs/Silex
site: silex.me
AlaSQL
AlaSQL is an open source SQL database for JavaScript with a strong focus on query speed and data source flexibility for both relational data and schemaless data. It works in the web browser, Node.js, and mobile apps.
language: JavaScript stars: 6774
repo: github.com/AlaSQL/alasql
site: alasql.org
Join thousands of other open-source enthusiasts and developers in the Open Source Hub Discord server to continue the discussion on the projects in this week's email!
🎙️ Interview with Mathias Wulff of AlaSQL - a JS SQL Database for browser and Node.js
Hey Mathias! Thanks for joining us! Let us start with your background.
Born and raised in the heart of Denmark, my journey into the realm of programming was as much a product of my environment as it was of my curiosity. Denmark, with its robust educational system and a culture that encourages exploration and innovation, was the perfect incubator for my growing interest in technology. My early days weren't filled with the usual video game escapades; instead, I found myself fascinated by the inner workings of Windows 95, diving into regedit, eager to tweak and learn. This early exploration set the stage for a career driven by a desire to understand and manipulate the digital world.
Other than a few websites in the late 90s my programming journey began with a TI-83 calculator. Programming in TI-Basic, similar to Basic but with calculator-specific features, I learned the importance of efficient code structure, initially constrained by the belief that variables could only be single letters because of the examples in the manual. A misconception that forced me to plan ahead and think creatively within the limitations.
My professional path has been diverse. Starting as a fullstack developer, I ventured through various roles: a consultant, a technical product manager, and a CTO. Now, as the Head of Technology in a company offering online tutoring, I apply my accumulated knowledge to create impactful educational technologies. Each role offered unique insights, but the underlying theme has always been my desire to understand the human aspect of harnessing technology to solve complex problems successfuly.
Who or what are your biggest influences as a developer?
My biggest influence has been _unwriter, an enigmatic figure who emerged during the tumultuous times of Bitcoin's second major fork. _unwriter's approach to solving problems wasn't just innovative; it was transformative. They tackled challenges at levels I hadn't even considered. The real eye-opener was not the volume of their output but the depth and breadth of their problem-solving approach. It wasn't just about writing code; it was about reimagining possibilities.
What’s your most controversial programming opinion?
I've always leaned towards Yoda Conditions, placing the constant before the variable in comparisons. It's a practice born from a blend of experience and a bit of suffering. But my broader, and perhaps more intriguing, opinion is about the nature of software itself. Software, in essence, is invisible. Yes, there are UI elements, but the system, the logic, and the architecture reside in the realm of the unseen. This invisibility makes software creation an art of aligning mental models across diverse groups. It's about creating a shared vision, a common language that transcends the barriers of different technical and non-technical perspectives.
What is your favorite software tool?
Surge.sh and Bun (Both CLI tools) hold a special place in my heart. Using them feels like being understood and anticipated by someone who cares deeply about your needs. They're like a thoughtful aunt who's known you since childhood, always ready with exactly what you need before you even realize it. These tools don't just aid in programming; they extend the programmer's mind, making the development process not just easier but more intuitive and enjoyable.
What are you currently learning?
I'm currently navigating the delicate balance between being hands-on and empowering others to take the lead. It's a dance of involvement and delegation, of knowing when to step in and when to step back. On a technical front, I'm exploring the capabilities and limitations of Large Language Models. Understanding their strengths and how to integrate them into workflows is a fascinating challenge. It's about harnessing their potential to inspire and augment human creativity and efficiency.
Why was AlaSQL started?
AlaSQL was the brainchild of Andrey Gershun, a programmer whose brilliance is unmatched in my experience. His need for a client-side SQL solution led to the creation of AlaSQL. I wasn't there at the inception, but having worked closely with Andrey, I can attest to his genius. His ability to see a need and create a tool that addresses it so elegantly is nothing short of remarkable.
How does AlaSQL work?
AlaSQL works by taking the SQL queries you write and converting them into equivalent JavaScript code. This conversion process allows users to manipulate data with the familiarity of SQL, coupled with the versatility of JavaScript. At its essence, AlaSQL recognises your need to filter, select, and manipulate data and simplifies the daunting task of implementing the code.
Where did the name for AlaSQL come from?
The name AlaSQL is a nod to its nature – it's SQL, but with a twist. "A la" implies a likeness to SQL, but with unique adaptations and additions that make it more suited to the client-side development experience. It's a blend, a fusion of SQL's structure with JavaScript's flexibility and quirks.
Are there any overarching goals of AlaSQL that drive design or implementation? If so, what trade-offs have been made in AlaSQL as a consequence of these goals?
Our overarching goal with AlaSQL has always been to create a tool that 'just works'. Developer experience is at the forefront of our design philosophy. We aim for SQL-99 compatibility and reasonable speed, but these goals come with trade-offs. The SQL parser and lexical analysis, for example, are extensive but necessary for the robustness and versatility we offer. One of our long-term visions is to integrate AlaSQL as a build step in bundlers, allowing for a more streamlined, efficient deployment of code. This approach would be ideal for static SQL but presents challenges for dynamically generated code.
What is the most challenging problem that’s been solved in AlaSQL, so far?
One of the most challenging and rewarding aspects of working on AlaSQL has been bridging the gap between SQL's Abstract Syntax Tree (AST) and executable JavaScript code. The ability to translate complex SQL queries into efficient JavaScript operations is a feat that required deep understanding and creative problem-solving.
Are there any projects similar to AlaSQL? If so, what were they lacking that made you consider building something new?
Back in 2014, the tech landscape was different, especially in the realm of browser capabilities and JavaScript libraries. At that time, projects like jSQL and an emerging SQLite in the browser were notable. However, AlaSQL distinguished itself by focusing on being lightweight and more attuned to the needs of client-side development. It was a response to a gap in the market, providing features and ease of use that others lacked, tailored for the web developers of that era.
What was the most surprising thing you learned while working on AlaSQL?
One of the most enlightening aspects of working on AlaSQL has been the depth of Andrey Gershun's coding genius. Initially, it was a challenge to fully grasp the intricacies and innovations of his code. His approach to problem-solving and system design was ahead of its time, and understanding his methods provided valuable lessons in advanced programming and innovative thinking for me.
What is your typical approach to debugging issues filed in the AlaSQL repo?
When tackling bugs in AlaSQL, my approach is systematic. I start by recreating the issue in the command-line interface of AlaSQL. Then, I dive into the debugging process using 'bun --inspect-brk', which allows me to step through the code, trace the execution flow, and understand the root cause of the issue.
What are you most proud of?
I'm immensely proud of the consistent contributions from our community. AlaSQL feels like a collective effort, a place where everyone comes together for a common cause – to make this tool better, not just for personal gain but for the sheer joy and satisfaction it brings. It's a testament to the spirit of open-source development.
How do you balance your work on open-source with your day job and other responsibilities?
I treat my work on AlaSQL as a form of mental relaxation, akin to solving puzzles. This approach allows me to engage with open-source projects in a way that is refreshing rather than taxing. It's a balancing act that involves knowing when to immerse myself in these projects and when to let it be.
Have you ever experienced burnout? How did you deal with it?
Burnout struck hard during the COVID-19 pandemic, a period when everything, including open-source participation, and staying on top of emails, seemed overwhelming. My response was to embrace this phase, allowing myself to step back and take time for rest and relaxation. This period of stepping away was crucial for my mental health and helped me return to my regular level of energy and perspective.
What is the best way for a new developer to contribute to AlaSQL?
For new developers looking to contribute to AlaSQL, I recommend starting with issues marked as 'good first issue'. Engage with the community, seek guidance, and dive into understanding the codebase. The most important aspect is learning to navigate and interpret the code, a skill that can be honed by using debugging tools like Bun for an enhanced and efficient development experience.
Where do you see the project heading next?
Looking ahead, AlaSQL is poised for significant evolution. Our focus is on modernizing the codebase, moving towards a modular structure that aligns with contemporary coding practices. We're also contemplating a lighter version of AlaSQL, catering to users who need less complexity but still desire the core functionalities. The idea of integrating AlaSQL into the build process remains a fascinating yet daunting prospect – one that promises to open new frontiers in efficiency and functionality.
What motivates you to continue contributing to AlaSQL?
The motivation for continuing with AlaSQL stems from the sheer joy of solving puzzles. It's about the challenge, the satisfaction of finding solutions, and the thrill of creating something that not only works but works beautifully.
How did AlaSQL get popular?
AlaSQL's rise to popularity is a testament to its utility and effectiveness. With 180k monthly downloads via npm and 3 million loads from websites, its widespread adoption speaks to its relevance and reliability. Its success is rooted in its ability to provide a powerful yet user-friendly SQL interface in the browser, meeting a critical need in the web development community.
Are there any other projects besides AlaSQL that you’re working on?
Rexreplace is definitely my darling pet-project. It gives you a smooth experience in performing search and replace operations from the command line. It's tailored to be part of one-liners and build scripts. The power lies in how the syntax instills confidence in what you're doing (in contrast to balancing awk, find, sed, and grep), and you also have the ability to use JavaScript to refine your actions further.
Where do you see software development heading next?
The landscape of software development is poised for a transformative shift, especially with the advent of large language models. These models are becoming akin to peer programmers, capable of handling complex coding tasks. The key skill in this evolving landscape will be the ability to precisely articulate what you want to achieve. This shift signifies a move from traditional coding, where the emphasis is on how to write the code, to a more intent-driven approach, where the focus is on what the end goal is. Developers will need to hone their skills in defining problems and objectives clearly, as language models take on the more routine or intricate coding tasks. By simplifying the coding process and reducing the barrier to entry, we open the door to a more diverse range of voices and perspectives, hopefully leading to a significant shift in the demographic landscape of the industry. This is particularly crucial in addressing the current gender imbalance in the field, which is heavily skewed towards men. By making software development more approachable and less daunting, we can encourage a more balanced representation of genders, leading to a more inclusive and varied tech community. This change isn't just about fairness; it's about enriching the field with different viewpoints and experiences, which is essential for true innovation and progress.
Where do you see open-source heading next?
I believe the mindset for supporting open-source projects through financial means is already present, but what has been missing is an infrastructure that truly supports nano-payments. This kind of system would allow for small financial contributions to be distributed efficiently across a project's (deep) dependency chain. For instance, a donation worth $1 could be split and shared among the various dependencies that make a project possible. This approach would transform how open-source projects are funded, ensuring a more sustainable and equitable distribution of resources. By overcoming the technical challenges of implementing such a system, we can leverage the existing goodwill in the community to create a more robust and self-sustaining open-source ecosystem.
Do you have any suggestions for someone trying to make their first contribution to an open-source project?
For those making their first steps into open-source, remember that every contribution, no matter its size, is deeply appreciated. When you're ready to start, focus on asking clear and concise questions. This helps not only in getting the guidance you need but also in making it easier for others in the community to assist you. It's important to understand the basics and communicate this understanding clearly. When presenting examples or issues, keeping them succinct and precise will facilitate better understanding and support. The open-source community thrives on collaboration, and every new voice adds value to the ongoing conversation. We welcome you to join in and contribute in any way you can!
What is one question you would like to ask another open-source developer that I didn’t ask you?
What was the driving force that prompted you to dive into your project? Understanding this can shed light on the diverse range of inspirations and passions that fuel open-source contributions. Each developer's journey is unique, and knowing what sparks that initial interest can provide valuable insights into the personal stories and motivations that enrich the open-source community.
Which open source maintainer should we interview next?
The creator of Bun would be an excellent choice for your next interview. Bun is a notable project in the open-source community, and the maintainer's insights and experiences would undoubtedly be valuable. Learning about their journey, challenges, and the vision behind creating Bun could offer a wealth of knowledge and inspiration to both current and aspiring open-source contributors.
Want to join the conversation about one of the projects featured this week? Drop a comment, or see what others are saying!
Interested in sponsoring the newsletter or know of any cool projects or interesting developers you want us to interview? Reach out at osh@codesee.io or mention us @ConsoleWeekly!