9 ms·
Take note: "Who the hell do you think you are thinking you can write a C compiler?" If you take that challenge it will seriously elevate your computer programmi
by wglb 8y ago
Take note: "Who the hell do you think you are thinking you can write a C compiler?" If you take that challenge it will seriously elevate your computer programming skills. In some circles, this will get you immediately hired.
Try a simple language, maybe devise an emulator to go along with it.
- deleted 8y ago[deleted]
- mlthoughts2018 8y ago> “In some circles, this will get you immediately hired.” Is this true though? I mean Google famously didn’t give a shit about hiring Max Howell (creator of homebrew) because of hazing-style pointless whiteboard trivia [0]. I’d guess the number of circles where a thoughtful side project that digs into deep computer science fundamentals as well as difficult implementation specifics would even get you the slightest attention for an interview is close enough to zero as to render it meaningless. If you think about a lot of possible different self-study options, ranging from cramming and shallow memorization of leetcode garbage or Cracking the Coding Interview, all the way to patiently applying craftsmanship and self-learning to a side project that exercises and demonstrates core fundamentals in a pragmatic way, the shallow memorization garbage will earn you money, while the side project will earn you an email with a hyperlink to HackerRank. It is one of the worst aspects of our industry, and a major reason why I would advise younger people to treat the idea that there are direct, stable, good-paying jobs with job security in the tech industry with a lot of skepticism. It’s an industry constantly trying to invent new ways to shift the demographics more and more into the least experienced and least expensive quantiles of candidates, and to arrange businesses where actual software labor productivity doesn’t have a strong tie to the company’s bottom line, except maybe for a tiny population of experts. [0]: < https://www.quora.com/Whats-the-logic-behind-Google-rejecting-Max-Howell-the-author-of-Homebrew-for-not-being-able-to-invert-a-binary-tree https://www.quora.com/Whats-the-logic-behind-Google-rejectin... >
- pjmlp 8y agoIn my experience, you are quite right. Most HR departments will only care about latest set of projects and education, barely giving any value to side projects. Yes, there are those that care about side projects, passion and such, but most of them tend to be startups and sometimes not with the desired set of benefits or requiring relocation.
- wglb 8y agoTo whatever extent you can get hiring decisions moved out of HR, I would recommend doing it.
- dionian 8y agotrue. though the problem extends to developers and developer managers as well. I've seen so many colleagues say stuff when discussing a candidate like "Well they just could write <x> algorithm on the board correctly. I found an edge case" or whatever. I've actually not been offered interviews in part because of failed whiteboard coding questions where the developers just weren't impressed. Yet once I land a job I usually tend to be in the top 25%, because most of the requisite skills are not algorithms, which I'm not particularly practiced at ...
- WalterBright 8y agoHR people often know little about programming, and will just compare bullet lists of requirements with the resume bullet points. People with unusual skills don't get hired through the HR front door, they come in the side door.
- giancarlostoro 8y agoThis is so true. I got my first (and current) programming job cause someone I knew at college recommended me. I didn't talk to HR till after they decided to hire me. So networking is important. Keep in touch with developers you meet at different jobs. You never know when they might land you your next job. It can be easier to skip HR and go straight to the person who will actually be your boss (directly or indirectly) for the hiring process imho. Edit: wrote "talk to me" instead of "hire me"
- ashleyn 8y agoOne day I decided to write a simple lexer-parser. It's really not black magic as it's commonly made out to be. You read in one character at a time to build "tokens" (e.g. one-to-n character sequences meaning something like "assign", "equals", "add") and then you use recursive methods to return data structures built out of the tokens. Honestly, the hardest part is remembering mathematical precedence, which doesn't even have much to do with parsing per se. Of course, a compiler backend is a much deeper concept, getting into things like register colouring and such. If you were to write a simple stack-based VM, it'd be much simpler. I've thought of doing exactly this for embedded systems projects where all I have is Assembly, or a very bad C compiler.
- SilasX 8y agoYes, that was my experience on the nand2tetris course, which teaches that as project 10 and 11: http://nand2tetris.org/course.php http://nand2tetris.org/course.php Interestiny, the toy language you’re writing a compiler for doesn’t have operator precedence except for parentheses, so it sidesteps that problem.
- Forge36 8y agoAnnoying thing I learned from doing that: source code does not follow a recursive structure. Preprocessor directives allow for some really strange structures. Of course it only caused my problems for a single file at work. I think a custom stack I can read through when the parsing gets weird makes slightly more sense in retrospect.
- setr 8y agonever wrote a c parser but I don't see why the preprocessor would change it from being recursive as long as C is; after preprocessing finishes, you should just have normal C?
- userbinator 8y agoA recommended article for those who want to know more about how to parse expressions with precedence very simply and easily: https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
- Lerc 8y agoI'm taking this path. So far I have The emulator -> https://github.com/Lerc/kwak-8 https://github.com/Lerc/kwak-8 An assembler -> https://github.com/Lerc/AvrAsm https://github.com/Lerc/AvrAsm A texbed playground -> http://fingswotidun.com/avr/AvrAsm/Testbed/ http://fingswotidun.com/avr/AvrAsm/Testbed/ In hindsight, attempting an assembler before a full compiler is a really good idea, It lets you encounter a lot of the pitfalls before you hit them in a much more difficult environment.
- WalterBright 8y agoIt'll also help you when your language needs a built in assembler! https://dlang.org/spec/iasm.html https://dlang.org/spec/iasm.html
- wglb 8y agoAnd as an example of someone who took this particular bull by the horns: https://news.ycombinator.com/item?id=16900938 https://news.ycombinator.com/item?id=16900938