Taking the compiler course changed my career from day 1.
In my first job, back in the late 90s, I was working for a company that, having taken their biggest customer yet, had to split a very large C monolith into chunks that could run on separate servers. The architecture team of the company found all the places where the system should be cut, but that let them with hundreds of functions that had to be replaced with asynchronous calls relying on a queuing system. I was hired into the team that had to stub those hundreds of functions, type up serialization and deserialization for all the hundreds of data structures involved, and gluing it all together. So they had budgeted for 6 months of typing from a team of relatively new developers.
As you might expect, that's not how anyone wants their career to go, but I had taken the compiler class. So I knew I could parse all the header files for the functions we needed to replace, parse the data structures along with it, and just generate all the boilerplate away. My dev lead thought there's no way we could do this, but his manager decided that, at works, giving me two weeks to try it would be a great opportunity to teach the new hire the limit of his knowledge. But as anyone that has taken the compiler course knows, parsing boring C structs and header files isn't magic. So two weeks later, the project was done, and it was working.
As you might imagine, the dev lead, in his 40s, couldn't handle the results all that well, and left quickly. So I went from being stuck writing boilerplate from month to a quick promotion to team lead in under a quarter, all thanks to the compiler course.
Thanks for the causal ageism from someone who is in their 40s or more now... The dev lead did not know something very useful for the project, this could be some one in their 20s, 30s, 40s or 50s... knowledge or lack of knowledge does not differentiate...
> "knowledge or lack of knowledge does not differentiate..."
I agree wholeheartedly. Knowledge, or even intelligence, shouldn't be the most highly valued skill in a team lead.
But there are many people extremely confident in their confirmation bias that seem to be unwilling to consider anything that might challenge their ideas. Our industry has a problem with celebrating the intelligent arsehole. Not only is humility not incentivized, it seems to be actively counterproductive.
I wonder how we can foster the kind of culture that values experience, encourages innovation, and is also able to get things done without chasing geese?
I am also approaching my 40s, but really, it is true that when one ages, so many uncommon things failed spectacularly, after that, one assumes everything behaves like that. But I try to keep a fresh mind and kind of brainwash myself to think positively first. Played out very well until now. (Because a lot of young developers fresh out of uni are taking with them the conservatism of the professors or mediocre student teams.)
I think you're misinterpreting here. GP didn't make any generalizations about people in their 40's. They were providing additional context about a specific individual. Moreover, the context they were trying to convey was more about the delta in years of experience than a particular age bracket.
Also, thanks for the casual sarcasm, casual assumption of ill-will, casual tone policing of others according to your personal whims, casual accuse-first-rather-than-clarify and embarass-in-public-rather-than-confront-in-private approach. Really brightens the mood in here!
I have been in the situation where you can see even fresh to the workforce that everyone is doing something inefficiently. So you come up with an idea.
In my case it was more prosaic than compilers: they were assigning “pages” to devs to rewrite in .net, but clearly the pages had similarities and it made no sense for different people to be building the same thing in parallel their own way. I was simply suggesting to do some design worm upfront!
But it is hard to be listened to when either young or new to a company. Glad they have you a chance. Lesson for companies: give anyone passionate a chance to experiment!
I've found that to a lot of developers, the tools that they use are magic, and replacing those tools or building new ones yourself is something that is beyond their imagination.
You'd think this is something more common with juniors than seniors, but in my experience it's been the opposite. Probably something about being distanced from the fundamentals made them forget how it's possible to build anything from scratch.
When I was 12 years old our class got punished for something childish. The teacher gave us an assignment to write I will not chew gum in class 100 times. Everybody was pissed. I did:
10 set i=1
20 i=i+1
20 print i, ". I will not chew gum in class"
30 if i<100 goto 20
40 exit
I don't know what GP did, but you don't need to write a complete parser. You can write a subset that can find the patterns you're interested in, which is much easier.
For many languages there are mature parsers out there that can be reused (e.g. Google's Closure compiler or babel for JavaScript, or the Soot framework for Java that also simplifies more advanced code analysis). In the worst case, it's sometimes possible to interface with the standard compiler for the language directly (for example, the TypeScript compiler provides TypeScript APIs for its parser/type checker/etc.). I believe for C++ for example, a Clang plugin (https://clang.llvm.org/docs/ClangPlugins.html) would have been a plausible way to implement something like this.
Heck, I have never take a compilers course, but in my first year of my first job I did similar code generation for Java just using sublime text replace-all with regex and/or python and templatizing strings. It was pretty “naive” and required more manual glue steps than yours I’m sure but it worked well for boilerplate and redundant code.
In my first job, back in the late 90s, I was working for a company that, having taken their biggest customer yet, had to split a very large C monolith into chunks that could run on separate servers. The architecture team of the company found all the places where the system should be cut, but that let them with hundreds of functions that had to be replaced with asynchronous calls relying on a queuing system. I was hired into the team that had to stub those hundreds of functions, type up serialization and deserialization for all the hundreds of data structures involved, and gluing it all together. So they had budgeted for 6 months of typing from a team of relatively new developers.
As you might expect, that's not how anyone wants their career to go, but I had taken the compiler class. So I knew I could parse all the header files for the functions we needed to replace, parse the data structures along with it, and just generate all the boilerplate away. My dev lead thought there's no way we could do this, but his manager decided that, at works, giving me two weeks to try it would be a great opportunity to teach the new hire the limit of his knowledge. But as anyone that has taken the compiler course knows, parsing boring C structs and header files isn't magic. So two weeks later, the project was done, and it was working.
As you might imagine, the dev lead, in his 40s, couldn't handle the results all that well, and left quickly. So I went from being stuck writing boilerplate from month to a quick promotion to team lead in under a quarter, all thanks to the compiler course.