Dear dev dairy: why is procrastination so addicting?
Still no git commit, but once I have my MVP done I’ll upload here:
So for full disclosure I started this project on September 23, 2021. Not sure if that is too early or not. I am a month into the project (not a few weeks as I estimated in my first post.) The current build runs well on Linux, connects to whatever Ethereum provider you want and looks sexy (at least to me, you can judge from the screenshots for yourself.)
The project is licensed under the MIT license. All libraries and 3rd party code is also MIT licensed to keep it simple.
The Windows build is currently broken. I don’t have a Mac to try that. Looking at supporting Windows 10 and Linux at first, with greater compatibility as time progresses.
Here is a list of what works today:
- The most important feature: dark mode (need to fix the notifications though.)
- Settings works. Notifications work. Dialog boxes work and are easy to call.
- Connecting to the Ethereum network using user configurable settings.
- Opening and/or creating new Ethereum wallets.
- Command console displays console.log() and other console messages.
- UI is still rough and has display anomalies and errors, but basic premise is there.
THE HERETICAL DEV DIARY OF WRONGTHINK:
I’ve made some controversial development decisions that I feel like I need to explain. In fact, I’m about to go against 3 holy doctrines of modern javascript development that are going to get me demonetized and #hashtag cancelled.
Yes this is a javascript/HTML desktop app. The natural thought is Electron/node.js right?
Well, sure, why not? I do love node.js for a lot of reasons and Electron is very powerful. In fact, before Electron was a thing I would use Internet Explorer WebView or embed XULRunner or Chromium into desktop apps in order to present web programs as desktop apps. Many clients had use cases where this made the most sense and when Electron came along it made my life easier.
However, node.js and Electron are not exactly lightweight and they add a significant overhead both in filesize and resource usage. If I were using Electron my wallet could be over a 200MB+ download for end users.
So instead of Electron I am using Neutralinojs. My wallet is less than a 2MB download currently.
No Electron or node.js. What further heresy dare I confess to?
Yeah, I love object orientated programming and all. Works really well in languages like C++ but not so much in languages like lets say PHP where they hacked OOP in after the fact.
Well, OOP is great for code organization and keeping code modular, one in one out type of architecture works great with OOP.
Right now, I have different functionality split into files like ui.js and wallet.js but I didn’t follow the OOP pattern. Why?
Well at the end of the day, what I care about is maintainability. Maybe down the line it will make sense to refactor the codebase in the OOP pattern. It would be easy to do, because all the function names basically start with the namespace, then the class, then the method name. The only difference is that they’re stand alone functions, not methods in a class to be instanced. But again, why?
Let’s say I made everything a class, well now I’ve got constructors to write, visibility to define, and probably a bunch of static methods that kind of break the OOP pattern in this case. What do I gain from this structural overhead? Encapsulation, sure but that’s about it.
It’s just not worth it to shoehorn the OOP pattern onto this code except to look cool. Maybe as I develop the codebase over time I will see a practical reason to refactor but right now I just can’t see any real-world reason to do so.
I am long winded and boring. Sorry you just read all of that, but also thank you for taking the time. Please feel free to chime in with your unsolicited advice that I will promptly ignore. However, once the source code is public I am open to your patches, submissions, bug reports, feature suggestions, criticisms, mockery, insults, personal threats, and other such common internet nonsensory.