Live data from Hacker News

What is the most effective thing you did to improve your programming skills?

stackoverflow.com

91–95 of 95 posts

Re: What is the most effective thing you did to improve your programming skills?

#91
post #18

I wrote a parser and lexer by hand. Building the mental abstractions to figure out how a syntax tree should be constructed and walked was amazing. It gave me the tools to visualize how code is structured, how to avoid poorly structured code, and how program flow actually works. The first revision took me around 6 months to implement, and the second about 3 days. Worth every moment of futzing around and hacking and de…

I did this too! After the second time I became bored with writing parsers by hand and now I'm trying to write a parser generator instead. It's extraordinarily good fun.

Re: What is the most effective thing you did to improve your programming skills?

#92
post #18

I wrote a parser and lexer by hand. Building the mental abstractions to figure out how a syntax tree should be constructed and walked was amazing. It gave me the tools to visualize how code is structured, how to avoid poorly structured code, and how program flow actually works. The first revision took me around 6 months to implement, and the second about 3 days. Worth every moment of futzing around and hacking and de…

Did you cheat and use a regex library in your lexer, or did you build a regex engine aswell?

I built recursive descent parser, and a lexer using the posix regex libary in 2 days first attempt and extra 14 days for semantic analysis and x86 code generation which operated by walking the ast. Most of those days were mostly learning x86 assembly. I can't understand 6 months, unless you did everything from scratch like the regex engine I.E Constructing NFA's, converting to DFA's etc etc.

Re: What is the most effective thing you did to improve your programming skills?

#93
post #92
post #18

I wrote a parser and lexer by hand. Building the mental abstractions to figure out how a syntax tree should be constructed and walked was amazing. It gave me the tools to visualize how code is structured, how to avoid poorly structured code, and how program flow actually works. The first revision took me around 6 months to implement, and the second about 3 days. Worth every moment of futzing around and hacking and de…

Did you cheat and use a regex library in your lexer, or did you build a regex engine aswell? I built recursive descent parser, and a lexer using the posix regex libary in 2 days first attempt and extra 14 days for semantic analysis and x86 code generation which operated by walking the ast. Most of those days were mostly learning x86 assembly. I can't understand 6 months, unless you did everything from scratch like th…

I think I cheated and used an existing regex library - it's been a while.

As far as the 6 months, it was my first major, major project and required so much learning and research on just how to structure code that it took a long time to craft. It didn't help that the design was so complex that debugging it was a chore. :)

Hence the V2 rewrite that took a couple of days.

Re: What is the most effective thing you did to improve your programming skills?

#94
post #91
post #18

I wrote a parser and lexer by hand. Building the mental abstractions to figure out how a syntax tree should be constructed and walked was amazing. It gave me the tools to visualize how code is structured, how to avoid poorly structured code, and how program flow actually works. The first revision took me around 6 months to implement, and the second about 3 days. Worth every moment of futzing around and hacking and de…

I did this too! After the second time I became bored with writing parsers by hand and now I'm trying to write a parser generator instead. It's extraordinarily good fun.

OOh, that does sound like fun. I've been toying with how to write a grammar generator on Node.js, lately - something in the vein of PyParsing.

Re: What is the most effective thing you did to improve your programming skills?

#95
post #50

I wrote a framework. Instead of thinking, "How do I want this program to work?" I had to think, "How do I want every program to work?" Instead of organizing this data, I had to organize any data. Instead of worrying about what my customer needed, I had to worry about what to put in my toolbox before I called on that customer. Instead of handling the current outlying case, I had to learn to anticipate possible outlyin…

Big design up front? Seems like a lot of your advice flies in the face of prevailing agile principles. What do you think about YAGNI? http://bit.ly/cpbljR (YAGNI Wikipedia article -- apparently HN doesn't like apostrophes in urls.)

Depends on your actual situation. In around 2004, Amazon was about to launch S3 until Bezos sent the team back to the drawing board because their current architecture would eventually hit a wall. Three years later, it finally launched. Big design up front paid off in their case as they've surpassed that "wall" many times over.

[Citation Needed]

Post reply on HN