lainchan / λ

how 2 git gud

Ivan Horvat · 2022-01-09 01:14
This post is fairly all over the place. I tried to clean it up where I could but it's probably best to just take it as a collection of random thoughts and post similar things and responses. There's lots of resources for improving as a programmer out there, but most aren't really useful. A couple of people whose opinion I respect admit this is a problem. Right now I'm someone who wouldn't call themselves a developer with a straight face. However, like lots of things in my life I'd say I'm intensely passionate (although that word leaves a taste of job application corpospeak in my mouth, I'm being sincere). And unfortunately, like lots of things in my life, this isn't really shown in my "output". My question is: how do I git gud? Or rather, what would useful resources look like -- what was the highest ROI programming "education" you engaged in? I'm not faithful that much that's worthwhile exists now -- my plan is to streamline my obligations to free up some time and spend some time working on a small project that I want completed. The best advice I've heard tends not to be very actionable. Things like "be in an environment with experts" is good work if you can get it, so to speak. Some say that programmers can't understand the whole stack anymore, which is why things are bad. I don't think this is true. It doesn't follow that you need to understand everything. Good things exist, and they weren't written by someone who understood the whole stack, QED. Maybe the weak form of this is true, "computers and software is too complex", which is kind of obvious, but not as meaningful. Somewhere in the middle, perhaps. I do think that there's a lack of understanding sometimes, I can accomplish a lot without understanding things. Trial and error until the tests pass, etc. Change & and * until it works (I've not done this, but I've heard people talk about this as something beginners do). This whole thing about understanding reminds me of maths somewhat. People are urged to "convince themselves", or are given exercises with the purpose of showing something meaningful about the topic. Are there good programming exercises like this? I don't mean computer science exercises, I mean programming ones. [1] Learning to read code and understand a codebase, how do you teach that? Would you need some kind of exercise -- "implement a parser for this uber-simple file format and integrate it with the testing system" -- for a specific codebase? Most likely not, people who've developed that skill seem to able to apply it to new things. Maybe they do that mentally though, coming up with an iterative Q&A that maximises understanding of the code. [1] Not that that's irrelevant or easy, just in the sense that I don't think this kind of education is *as* lacking -- though it's not nearly perfect either. You can have a good understanding of things and no be a good programmer, this post is about the difference between the two, and how you make the jump from (0,0) to (0,1) or from (1,0) to (1,1), if that makes sense as a spatial analogy for this. There are orthoganal skills and knowledge involved, I think, though there should be a lot of positive transfer if you do it right. When people talk about throwing away the first copy, that's basically giving themselves an exercise to understand the topic better. Are there other things like this people do? What goes through the head of a good programmer. I feel like we've answered this question for lots of other activities, somewhat. I feel like I have a decent understanding of what being a chess grandmaster is like, for example, from having dabbled in the game and read about this kind of thing, and seen interviews with them, etc etc Where is the window into the mind of a programmer? The best I can think of is ESR's how to be a hacker, which is a good sort of "manifesto" but not full of useful wisdom or anything. When I look at people who I look up to, they never seem to be doing naive trail and error kind of stuff. They *know what they are doing* in a very literal sense. They understand the problem and how to solve it. It's just hard to see how they get there, and most of the time they don't really know either. Hell, I don't really know how I got here. I don't know what advice I'd give to myself two years ago. I installed Linux, one thing led to another, now I can sort of write code but not really. What I want is in the next two years to not be in that position, I want to be able to tell people who are like me now what they can do.
Random · 2022-01-09 04:30
>>29386 Seibels Coders At Work The Phoenix Project Agile Manifesto You'd learn "what goes through a programmers head" by writing more programs, lain.
Nguoi La · 2022-01-20 08:52
>>29386 Acquire a ton of money and pay people to code for you There is literally no way to be better than that
Mario Rossi · 2022-01-20 23:44
>>29393 >You'd learn "what goes through a programmers head" by writing more programs, lain. /thread
Crazy Jake · 2022-01-20 23:57
>>29386 Tangentially, if you want to amplify whatever intelligence you have, I would look into Zettelkasten. The org-roam docs explain the value of this system of note taking well. https://www.orgroam.com/manual.html#A-Brief-Introduction-to-the-Zettelkasten-Method >The Zettelkasten is a personal tool for thinking and writing. >It places heavy emphasis on connecting ideas, building up a web of thought. >Hence, it is well suited for knowledge workers and intellectual tasks, such as conducting research. >The Zettelkasten can act as a research partner, where conversations with it may produce new and surprising lines of thought. https://www.orgroam.com/manual.html#Note_002dtaking-Workflows
Terzibashjian · 2022-03-11 21:06
>>29550 On the contrary, a single dedicated programmer can be much much better if your goal is to make efficient programs and not just a pile of convoluted garbage slapped together by too many hands at work.
Moore · 2022-03-11 23:11
I only properly learned how to program by writing my own programming language. Seeing how things actually work, and what is necessary and what is an optional design decision.
Molly Millions · 2022-03-13 10:01
>>30382 Possibly but then you hire him
Yamaoto Toshi · 2022-03-14 03:59
>>30383 well that's not what is needed to know how to program lol so... also, there are concepts not in a programming language implementation that are required for general programming
Hiro Protagonist · 2022-09-27 21:37
The best way to get really good at programming is to get a job as a programmer while continuing do harder/more interesting projects on the side. You need to get a good company with a good team though. I got really good really fast when I had other people reviewing my code and starting to think about extensibility, speed and maintainability as a necessity. I suggest working at a medium size unicorn/scaleup so you can actually write full programs and features and not to work at a giant company where you'll just be a drone trying to optimise existing code by 0.1%. If you can't get a job just write more code and do coding challenges. You should be reading books about code organisation and trying to think about and apply the principles within, think about what parts of the code you could apply the principles to, think about whether you agree with all the principles and where they would fit in. I recommend 'A philosophy of software design' as a good practical book thats a bit more down to earth than clean code. SOLID is good too though. Don't think too hard about languages, people on Lainchan seem to obsess over learning some particular language but they're all the same after a while and each one just replaces flaws with other flaws.
Tequila · 2022-10-02 23:36
Watch Harvard's CS50 and MIT's CS courses, they're freely available online. Do puzzles like Advent of Code. If you can't solve a puzzle, find hints and try again. If you *can* solve a puzzle, look at other solutions anyway. Write or rewrite tools you like in languages you'd like to learn. Simple ones at first, then bigger ones. A simple grep in Python? Perhaps a basic wc clone in C? Can you make them smaller, faster? Do modern web stuff and then switch to C in DOSBox. Then back again. Read tutorials, documentation and references. Revisit your old Advent of Code solutions. Could they have been written differently? Do some new puzzles. Revisit your old tools; how does that code look now? Write new ones. Maybe a small game? Try, fail, try again. Lather, rinse, repeat. Try a LISP. Try an array language. Try Forth. But don't be a purist; try PHP, try Perl, try a modern BASIC. Most importantly, find other programmers and exchange experiences. IRC, the web, it's nice and all but IRL discussion beats online by far. A job, perhaps, or maybe join a user group? > What goes through the head of a good programmer. Code. Lots of code. Writing code. Reading code. Looking at other people writing code (Youtube!). Reading code together. Constructive criticism. Discussions -- not arguments -- about code. Suggestions and ideas from other good programmers. All the best programmers I know have been doing it for a long time -- decades. Find some and talk to them. With any luck, you'll find ones that are humble and helpful. If so, repay in kind. If you have the proclivity, grind will get you there in the end. Time yields the highest ROI.
queue · 2022-10-03 20:04
https://schiptsov.github.io/ S.Levy Hackers book
dup · 2022-10-05 23:27
>>32936 Fun read, I enjoy his outlook
Dr. X · 2022-12-07 12:40
>>29386 What level are you at? Which languages do you know and how proficient are you at them - do you have a decent understanding or do you just try soykaf until it works? I have some memory of which things made me better at programming, but my advice will depend on your starting point.
J.C. Denton · 2022-12-24 15:23
>>33667 >>33667 >>33667 Not op but im struggling in the same way... Current level: Know Java, OOP and such Been stuck ever since And i think my understanding is not that good i just try until it works
Void · 2022-12-24 18:35
>>33783 Learn more languages; preferably ones that are very different from Java. I recommend Lisp and Haskell. Learning a new methodology forces you to look at familiar problems from a different perspective, and gives you a better appreciation for the underlying concepts.
Koos van der Merwe · 2023-01-01 09:59
>>33783 I'm going to disagree with >>33787's advice completely. While Lisp and Haskell are very interesting languages and I'm glad I took the time to learn them, they have quite a learning curve (especially Haskell) and there are way fewer learning resources for them on the Internet. They're best learned when you're already a decently competent programmer. Besides, jumping around topics and never learning anything in-depth is a poor learning strategy. My biggest recommendation would be for you to unlearn as soon as possible the habits of copy-pasting stuff you don't understand and trying random changes until the program works. Forbid yourself from copy-pasting a single line you don't understand. Of course you can use Stack Overflow, but when you find a question matching your problem, pause and read a few answers. Try to understand them until you can explain every line of code. Use the Java documentation and Google searches if you don't know what something is. Then compare the answers to see which is best (it's often not the top one). Only then you can copy-paste code. When you have a bug in your program, forbid yourself from making random changes in the hopes that it will fix the problem. Instead, use either lots of print statements or a debugger to examine how the program works and find the point where its actual operation differs from your expectations. Understand why that happens, and only then make a surgical change that will fix the problem. You may have learned from poor-quality materials that encourage "monkey see, monkey do" programming. You may need to go back and read more in-depth explanations. In general, googling "best <language> books site:reddit.com" tends to give decent results. Reddit has a lot to hate about it but it gives better recommendations than the random blogspam from self-promoters you usually get. In particular, the book "Effective Java" is often recommended for intermediate-level Java programmers. Make sure to practice. In general, you should divide your time between reading about programming and writing code; both constantly reading and constantly coding are suboptimal uses of time. I'm not going to give project ideas here because you can find thousands if you just google "programming challenges" or "programming project ideas". You get better at programming by attempting increasingly ambitious projects. If you really want to switch languages, I recommend that your next language be C. It is "closer to the machine" than Java and will demystify a lot of what goes on under the hood. "C Programming: A Modern Approach" is a very good beginner book. I think it's better to leave Lisp and Haskell for after you're fluent in 2+ mainstream languages. I know that my advice may be hard to take because it will slow you down initially a lot. However, you have to accept that the path to getting good goes through deep understanding. It's a bit like warriors vs wizards in RPG games.
push · 2023-01-01 16:47
>>29386 From what I'v read, it all depends on what's your definition of a "good programmer". You can take both from a vocabulary or encyclopedia or make it up by yourself, anyway it won't be complete. So there is some freedom about the definitions. Another way is to look at what people are considered good programmers by community and then understand what are personality traits that they share. The sad part about it is that, it usually falls into two categories programmers that did great tools, like Linus Torvalds or Guido van Rossum, and competitive programmers. So I'd say you should first decide if you like to program or not. And then just do it, and by doing it you will come up with your own definition of a good programmer, it will take something from others definitions of course, but I'm sure you will add something or remove something from it. Now, who is a good programmer, imho. I think good programmer is the one who can implement any abstract algorithm in real code, to make a working prototype in the most effective manner, which effectiveness has to be defined by abstract algorith definition. Sometimes it'll be defined by the time limit like in competitive programming, sometime by deep math understanding or physics understanding like in robotics or sensors, etc. So programmer is the one who programms something and how good that programmer actually is defined by how well he programms it. It sounds dumb, but I think it describes it well. Because programming is a really very general term. At first to be good programmer in any field is just to implement your own algorithm, it can make a whole new field for programming in general btw. But then more people will come, they will also learn from your work, they will find (or not) better ways, does it mean you suddenly become worse programmer? Yes, in some sense. So to be more strict, really good programmer is the one who unsertands his field very good, one of the best at his field.
Sage · 2023-01-01 23:56
>>33845 Lisp (CL in particular), has plenty of good learning materials. I find your advice odd as the main lack of resources is of stack overflow copy and paste responses. Further I'd argue the style in which the introductory lisp books provide is a more in depth and inquisitive look at the field than your typical ALGOL derivative. Really the contrast is useful for learning different styles of design, and lisp is just an effective vehicle for learning paradigms and ideas well. From low level design to different ideas of "high level" design. >>33783 Land of Lisp is a good book to learn common lisp