Many would ask to see the page I'd read and I'd show them and they would ask how I got my code working from an example that had nothing to do with what our task was.
I think there is a lot of value to looking at a SO answer, generalizing it and making it work in your code and doing it quickly. Knowing which SO articles are junk and which ones are gems is something many take for granted but is actually something close to having the right 'gut' feeling.
I don't remember the line of reasoning or detailed investigation that led to the solution, but I found something in a build configuration file that looked suspicious enough to warrant a search for an exact phrase in the code. It turned up a StackOverflow answer, where three lines had been cut and pasted into the build file.
There was some specific change in a library or binary upgrade that had broken the thing that this particular change was meant to fix, and the problem was solved by removing the lines in question.
The commit comment for these three lines was "merge hmmmm", which was also the only local documentation I found that I could have used to cross-reference with anything else.
Some point to that as an aspect of the replication crisis, but it's really just the nature of identifying and abstracting common elements out of specific goals.
This will probably get downvoted but I disagree with this.
IMO you should never be "generalizing" random pieces of code. What you should rather look for is help in augmenting your own logical reasoning process: e.g., I want to transform X to Y with BigO of Z complexity, how do I do that? Look for stuff that helps you understand how to do this. Once you do, you shouldn't need to generalize other people's code.
I don't mean to say that you should reinvent the wheel. Rather, you should understand that you need a wheel to solve your problem - where you get the wheel from isn't really that relevant (except for copyright, licenses etc but that's a separate topic).
Legal textbooks are the best example of a reference I've seen: the index is grouped by legal concepts and terminology, and is impenetrable to non-lawyers.
Like jargon, it gatekeeps; but that's not its only purpose.
When I had to actively memorize I paid way more attention to what I was doing. I think the online search multitasking is honestly very bad for sustained attention and very passive. As an alternative I started to look up library code directly and just read and I feel like I learned more about how python worked in a few weeks than I did in months or so of just typing things into google.
I'm very much from the opposite camp. I learned to code in C in vi and didn't really have anyone to ask other than the manpages and the K&R book, I'm pretty sure I didn't even use syntax highlighting.
I do think this has shaped my programming even later to where I stubbornly stick to boring but stable programming languages like C, C++ and Java, and these languages I've used for in some cases almost 25 years and where I virtually never have to look anything up. It's not like I haven't dabbled in other languages and paradigms, like python and haskell and whatever; but it's not those languages I use when I need to build something. I just don't see the value in constantly learning all this flavor-of-the-month stuff. When the dust settles, most hyped upcoming programming languages become footnotes when the history of programming is written.
I do agree that quickly jumping to an online reference because you can't remember the order of the parameters for a particular method is a crutch that if you were forced to remember would remove that slow down. But at least I'm able to remember the correct method vs having to search for which method is needed and when.
I don't really know what the take-away is. This isn't a fast way to learn to program, or an easy way, and I'm not even sure I'd recommend anyone learn this way, but I also can't deny it's brought some very tangible benefits.
Everyone learns differently.
I am not surprised changing your approach helped you to improve your skills. But if someone were to use online search to say... find the library code, and read the manual, they'd likely get similar results to yours, right? ;-)
https://youtu.be/h1t14GnnQhc?t=20m15s
INAZUMA KICK!!!
n.b. I program like this too, just plain Emacs and I try to remember API and package names before consulting Dr. Google. The IDE trying too hard to help me is hugely distracting.
If you're coding in emacs, do you self refresh the pages?
More generally speaking, most people today would be incredibly frustrated getting information about anything generally if they were plopped down 30 years ago. When I was a product manager back then, we paid consulting companies large sums of money to get the most basic competitive information faxed to us because you couldn't just look it up.
As a new developer, this is what I am doing and focusing at. Not be reliant on the internet and it works. Because I have several books and for example I can read Mozilla MDN offline.
I use a website/app and books, the website updates itself. But for some things I still need to look elsewhere than Mozilla MDN, e.g W3.org
Mozilla MDN is pretty much the last thing I’d prioritize for offline reading, since it’s relevance is tightly coupled to the availability of the network.
I might prioritize offline resources for Raspberry Pi and other computing platforms, that make more sense without the Internet.
But above that, maybe a few books about growing food in one’s own garden. :-)
There's a difference of building a reference library for home use or homesteading, crafting, etc than say working for 8 hours on a coding project directly tied to the need to use the computer. Computer languages/libraries/etc change frequently enough printed books become obsolete fast. How/when to plant, what to feed them, etc hasn't changed too much for generations. Nor things like when to use a dovetail joint, or other building techniques. Books from the 1900s would be just as useful today.
Nowadays I've always discovered that I'm not the first person to ask.
Just a small example, I imagine there are a lot of JS developers who know that they need to create a new function using “=>” or “.bind(this)” if they need access to “this” within the function… and if they don’t, things break, without really knowing why (even though they know the solution).
TLDR: the best developers I’ve worked with go beyond “knowing the solution” to “knowing why the solution is the solution”. Understanding “why” something is the way it is becomes difficult when something like Copilot autocompletes the correct answer.
Sometimes pulling an all nighter and beating your head on the wall is less productive than just stopping to take a break and coming back at it with a fresh mind. FAANG PMs don't get this and probably think less of you because your Zen like approach is anathema to their fast paced do or die approach now. You can't be productive if your butt isn't in the chair.
Literally went to the library to read books on IR and make sure I understood what the doc was saying. Asked around to find people who worked on these kind of sequencing. Went to a small repair shop and bribed the tech to give me hints on how remotes work.
It was fun in retrospect, maddening and incredibly taxing at the time.
I don't think we did anything fundamentally wrong, short of underestimating the problem space. It's also not as if I was left in my corner for weeks, I got pretty good advices (like go finding more help and returning to basics). Getting info before the internet, before makers got into habits of published maintenance manuals etc. life was just way harder.
But it was less stressful, because you didn't have daily standups and biweekly sprints.
Leet code interview question where I could just find the answer in 5 seconds with a google search, might actually be good interview questions if they just let me use a google search.
You still have to know what to look for.
Being good at word problems in math I think are the only place where “being a math whiz” is what it takes to be “able to code”. How you setup your equations to solve a simple algebraic word problem, can make solving the word problem super simple, or more complex.
My kids do Singapore math, and holy crap does it force you to think about other ways to approach solving problems, a valuable skill.
Do you have any resources yo share? about Singapore math in English?
I’m always trying to solve the damn problems with an algebraic equation that is way more complicated, and my kid draws a bunch of bars and things and effectively does algebra but with what ends up being actually a simpler equation.
I believe this is the real reason spam-answer/grifting sites are so bad. They pollute this shared commons of freely available information. From a policy recommendation I certainly hope these free resources are kept in place, timely, and free from spam/SEO farming.
The “own” snippet that comes up the most often for me is a binary-search implementation of integer cube root in Python - I know how to do it but the edge cases trip me up enough times that my pre-written answer is faster than trying to write it from scratch.
I Googled a problem and then found my own answer from years ago!
Old me was much smarter apparently! :-D
Certainly some things were harder and slower, but if forced you to use your brain more and think through some types of issues. You rarely got instant gratification of reading someone else’ solution to your weird problem or error.
It forced you to really look through the source code and think things through from first principles. To understand your runtime (C programs barely have a runtime really, but it still exists in complex programs that must run for long periods like a MUD). It forced a deep knowledge of your tool chains and made you really good at them. It forced you to be more narrow but also creative and deep. From a first principles perspective it taught me ways of working that are different to younger programmers, and even modern me. Often looking something up is right. But sometimes you are best served by learning something for yourself, through source code and such. I learned so much looking at other code based and constantly asking “why?”. Why is this code this way, etc. I can’t say if it’s better or worse, but I got really good at MUDs and it turned into a long career in tech with no degree :)
I briefly ran a PK-focused MUD (hosted on Wolfpaw) and remember being amazed at having 15 players online simultaneously. I was ultimately forced to shut down the MUD by my parents, because working on it started negatively impacting my preparations for final exams.
I'm not sure, but I suspect it's that it was the technology improvement more than it was my improvement.
What I find is that it can be faster to just look at the documentation that comes with the tooling. Usually a good stack overflow answer is just regurgitation of something that's already covered in the documentation that the asker clearly didn't read a lick of. When you start using a new tool, just skimming the documentation end to end can but you at such an advantage and set you up to get working with the tool in the correct way with a decent understanding of some of the caveats that might be at play with your particular use case (which is rarely something that can be gleamed from a terse stack overflow answer). Even just a pdf covering a language can be handy to thumb through the chapters and revisit common patterns like for loops that can vary in different languages, once again its easier to trod down a familiar pdf textbook than it is to try and trench up something relevant from google search these days.
If you already have a working pattern that you're just modifying, you might get away with just looking up documentation. If you already have a strong foundation and know exactly what you want to do, then you're just looking up the syntax.
Maybe another analogy might be, learning vocab to better express your thoughts, vs looking up the exact spelling of a word you already know.
This is more or less what I got out of the 2nd half of my higher education. Plus I got a ton of reps in, so to speak, to really refine my judgement and ability to research. It's the old adage about learning how to learn, teaching one to fish, etc. I'm sure this all applies to many fields, but especially one like ours that changes rapidly. Thanks to this education, I feel like I can switch careers pretty easily.
I make no mistake about it. I don't feel like I know what I know without the help of the Internet; I feel like I'm just some bloke who is good at sussing out what's important and how to apply it to my job. I think this is a skill that is missing from a number of my colleagues though.
The major difficulties are indeed around the things you mention, but one solution for that is having a few large projects open in another IDE window so you can search for functions, idioms, algorithms, patterns.
I guess I got used to it because I started coding professionally before Stack Overflow. There was Expert Sex Change, but it sucked, so I avoided it like the plague. It was mostly C#, so the combination of Static Typing + Intelisense also helped me not needing internet. Before C# I coded in Perl, so seeing other people's code wouldn't help anyway ;)
We used to have these little folded cards with the complete syntax of Pascal or C and that would be enough. Nowadays, you don't even know all the languages and libs that are in a given stack.
E.g., there are languages where the offline manual covers 99% of all your needs. I include bash and c, octave, matlab in this category.
Then there's languages that feel the offline docs are best left ad an afterthought, and focus most of their effort either towards funky online documentation websites, or effectively relegate it all to stackoverflow.
I'm fine with the built in `man` command, and of course offline documentation for almost everything. It's actually kind of weird that our first instinct is to waste internet bandwidth while we probably have a copy right with us.
Exactly, yesterday I wanted to to have DNS over HTTPS and if you're going to search for it, you have to do a lot stuff. When there's the manual and literally and says that you need to add two lines and uncomment the specified comment.
I'm happy with man.
I know it's sometimes easier to google particular questions and that some projects lack documentation, but many if not most programming tools include very good documentation in the same package. And many include their source too.
I think saying you'd be useless for lacking online access to that knowledge is an exaggeration.
Not being able to pull new dependencies is more problematic, in my opinion.
Programming information tends to be easily verified so organizing it's skill around filtering google, stackoverflow and so-forth is fine. The resulting program can be tested fairly easily.
Uncritically taking in other sorts of claims can be very problematic.
It seems like mastery and knowledge just for the sake of it is less of a priority these days. Why bother wiping your ass when the cloud can do it for you?
Relying on a reference as a guide is not necessarily a sign of a lack of mastery any more than not using a reference is a sign of mastery. Sure, there is always the possibility that a reference won't be available when you might need it, but for the obvious exception, perfect recall is not what mastery is about.
Memorization is not all of mastery but it sure is a large part of it. Like, I get it, I can't memorize for shit and I rely on Google/SO to an uncomfortable degree for programming, but that is more because they are the most convenient. If you can't function because Google is down, when you should be looking in an offline reference like a local copy of the docs, library code, a man page, or a book, then I would consider that to be a pretty crucial gap and weakness in technique. Resourcefulness is another component of mastery, and, frankly, even more important than memorization in my book.
It's the same thing for so many other parts of life... just because you use Google Maps to navigate doesn't mean you shouldn't also know how to read a map and navigate on your own.
Not at all. Memorization is a common side-effect of mastery, just like mastering a lot of physical activities tends to have a side-effect of improved strength, endurance, etc. No question there's a lot of correlation between memory and mastery, but that's not the same as being an essential component of it.
An elderly master of a physical activity might well have a significantly deteriorated physique and still have mastery, and dementia patients can retain mastery of musical instruments, jigsaw puzzles or contract bridge (even if they can't name the suits, let alone articulate simple bidding rules) despite severe deterioration of their memory as applied to those specific skills.
> If you can't function because Google is down, when you should be looking in an offline reference like a local copy of the docs, library code, a man page, or a book, then I would consider that to be a pretty crucial gap and weakness in technique.
You might consider it a crucial gap and weakness. I might frame it more positively, that it's a great advantage to NOT have to rely on a reference tool. However mastery does not preclude weakness. Heck, master writers like Robert Caro, J.K. Rowling, Neil Gaiman, Joyce Carol Oates, Stephen King, Danielle Steel, and Don DeLillo have spoken in detail about being dependent on their old school tools and are unable to take advantage of the benefits of modern writing tools, and there are other writers for whom the reverse is true! No one suggests they are anything less than masters of their craft.
Certainly, resourcefulness is an important skill, and a resourceful person with poor memory will have lots of ways of getting by without having to remember things. However, there's a bit of a limit to what's reasonable and important for mastery. Sure, a resourceful soccer player can still apply their craft without a ball or a field, but really, how useful is their skill? In distributed computing, people often absurdly complain about how an application node behaves when the network is down, which raises the interesting question of what work the node might be expected to do in that scenario. Similarly, when a software developer can't function without a working computer, or if their network connection is down, that's not great, but might not be all that important if the development work they are doing is entirely dependent on those tools anyway.
> It's the same thing for so many other parts of life... just because you use Google Maps to navigate doesn't mean you shouldn't also know how to read a map and navigate on your own.
This is a good example, and not just because reading a map and using Google maps are different skills. It's a good example because one can have mastery of map reading without necessarily having memorized a single map or geographical layout. Heck, maps have legends specifically so you don't have to remember much about them in order to use them effectively. Memorizing geography would be a distinct form of mastery separate from map reading.
I think it's entirely possible to work offline first and foremost. You'd need the documentation for everything local. Operating system, programming language, libraries, frameworks, etc. Mass storage makes this more practical now than ever.
A lot of projects don't provide very downloadable documentation which would make it harder and, of course, you'd miss out on knowing when the documentation is lying.
The biggest problem with it is probably nothing intrinsic, but the fact that you'd be swimming upstream doing it.
I remember when I was at the South Pole I had to queue my internet queries for when the satellite was up.
My style of coding is very intimately connected to having access to online resources. I regularly search for things like how to concatenate strings or the syntax of a for loop in some language. I also use the internet for higher level things like how memory management works on some system, or how something like an ECS architecture works. I also spend a lot of time looking for the right components to put into my own systems, so if GitHub were down it would bother me.
Basically I'd be useless without the internet. The coding tools themselves, all the examples of how to use them, and all the actual knowledge about how everything works is on there.
Perhaps the only thing that's actually my own input is the judgement about what things are important, which sources are reliable, and which people are authorities.