Hacker News new | ask | show | jobs
by acbart 1924 days ago
I still believe it is easier to teach good habits to folks who have experience with bad habits, than to teach folks who have no experience at all. It's not too hard to find examples of how those issues (e.g., globals, stringly types, god-functions) can backfire once you get to scale, but it's really hard to motivate them when folks are still trying to wrap their head around function calls and variable assignment.
4 comments

You can impart the concept on those without experience, but what you get is cargo culting. Often better than nothing when used for good, but causes sub-optimal (at best) solutions in some cases where people refuse to acknowledge or don't even see better ways to do something because it goes against what they were taught.

That's not to say I'm free of this. I doubt any of us are truly free of this. That said, recognizing it's a thing means you can try to put something into your design practice/workflow where you sit back and think if there's a better way that's a "hack", and try to honestly examine the pros and cons and whether it's actually the better solution.

This is quite true. We are building a VBA interpreter and the language is full of problematic practices. Go's much-maligned if err != nil pales in comparison to On Error Resume Next. Good static analysis and linting really helps here.
> We are building a VBA interpreter and the language is full of problematic practices

Fascinating. I'd love to know what motivated you to undertake that task. Is this open source or a proprietary project?

It will be released as open source over the summer. Currently only the interpreter is working. We are still building out the UI builder and editor. Take a look at our earlier comment regarding motivation/business model:

https://news.ycombinator.com/item?id=26325064

What's your stance on accessibility? I'm worried this tool could be used by enterprises, considering their reliance on VB, so this is pretty important IMO.
Cool idea, looking forward to playing with it.
Or they don't understand why its a good habit and so follow the advice blindly, not knowing when to skip it or not. Breadth of experience.
Yeah, it would be fun to imagine a language designed with a video game style unlock progression. I remember programming in TI basic with a small number of global variables and subroutines. No scopes, no local variables, functions _couldn't return variables_, you had to manually keep track of which variables a subroutine was allowed to use, and where it would write out its outputs. After a few months with this functions, scopes, and return values seemed like super powers!
A somewhat similar idea is the Hedy programming language: https://www.hedycode.com/