4 ms·
Writing a code generator. It was so difficult that every other programming task since was easy in comparison. Conventional wisdom advises not to try anything
by edw519 16y ago
Writing a code generator. It was so difficult that every other programming task since was easy in comparison.
Conventional wisdom advises not to try anything too hard because you might fail. True, but that advice discounts the biggest dividend of all: who you become in the process.
I didn't realize how important this was until I saw how easy it was for me to do most ordinary programming gigs. It was like playing basketball with a regulation hoop when I had already practiced with a smaller one. Other programmers struggled because they hadn't seen that problem before and they had never stretched themselves.
Building hard things on my own made me a much better programmer when I did work for others. By far, my best investment ever.
- ehsanul 16y agoI've seen you mention this code generator in a few comments. Can we get more details about this project? I'm sure many here would be interested to know. If you've written another comment on HN explaining it in more depth, or written a blog post about it, I for one would love to check it out.
- edw519 16y agoI wrote the original in Basic as a tool that we used in our service business. We collected requirements and entered them into the app as "blueprints". File layouts, form parameters, process parameters, etc. The generator read the blueprints, then built the data base and wrote all the necessary custom functions and routines. Most of the programs were already there as parameter driven shells. I rewrote it in Visual Basic, then in php. This was a handy tool for systems analysts who knew what they were doing, but not for the average user. There were 2 basic problems: collecting requirements and entering them as parameters is hard and you still had to convert the data. Now I'm working on a front end to the 3rd generation of the generator. It will read existing data files and use an artificially intelligent process to build the parameters then were previously collected by a human. It will also populate the new data base. This is the basis of my start-up. I will keep the community updated with my progress. I also got your email from your profile and will give you (and anyone else who's interested) an update. Thanks for your interest.
- logicalmind 16y agoI had the same experience. Time and time again I'd walk into a situation where some enterprise app had been put together in some haphazard fashion by any number of people. As the person brought in to fix this otherwise unmaintainable system I had to figure out a way to deal with the mass of code and complexity that was already in place and somehow transform it into something worthwhile. That is when I got the idea for code generators. Now I can walk into a mess and generate reliable code for various application features and slowly replace functionality as necessary.
- sandipagr 16y agoYeah seriously would love to hear about the project. What kind of code generator was it?