3 ms·
You're going to read your code 100x more than you're going to write it. Optimize the code you write for reading. Your code will be in production either much lo
by falcolas 10y ago
You're going to read your code 100x more than you're going to write it. Optimize the code you write for reading.
Your code will be in production either much longer or much shorter than you think it will. The 5 lines of code you spend three days perfecting will be replaced in a week, and that one-line 3am hack will be out there for ten years.
A good walk around the block will help you solve a problem faster than staring at code.
Find someone smarter than you and learn from them. The corollary is if you're the smartest person in your area, you're more likely to stop learning.
What the customer needs is rarely what they say they want.
You will derive more long-term benefit from finding an answer yourself than finding that answer on Stack Overflow, at the cost of time. When time matters, at least try and understand why the Stack Overflow answer is right.
Don't be afraid to question a decision you don't understand, or don't like. At best, you'll get either your mind or the decision changed. At worst, you will learn something about your co-workers.
There's never enough money, time, or domain specific knowledge.
Office politics matter, regardless of how much you wish they didn't.
- e12e 10y ago> Find someone smarter than you and learn from them. The corollary is if you're the smartest person in your area, you're more likely to stop learning. Maybe. I think the other side is find someone smarter than you, but less experienced, and teach them. You learn much more from teaching than being taught. If you're at loss of finding smart adults, find some children ; they're probably all smarter than you, in the sense of finding good questions (which is much more interesting than finding good answers; finding answers is just work, finding great questions require inspiration. A perfectly good example of a good question is: "why is the sky blue?").
- kzisme 10y ago> Find someone smarter than you and learn from them. The corollary is if you're the smartest person in your area, you're more likely to stop learning. The issue I have with this is finding that person.
- andai 10y agoThere have been some posts on HN about hiring more experienced developers for one-on-one tutoring / pair coding over Skype (on freelance websites etc). A guy wrote a blog post about it (can't remember name), he hired a couple people for a half hour each until he found one he liked. Alternatively see if there are any meetups in your area (meetup.com is great for that).
- falcolas 10y agoIf you can't find someone to teach you, then yeah, this would be a good alternative. And so long as you're willing to put significant effort into correctly answering their questions, it should be a good substitute. That said, teaching will not typically help you learn something new, though it will help refine the knowledge you already have. For example, answering "Why is the sky blue" will give the chance to refine your own understanding of refraction and how that interacts with air, but it's unlikely to guide you into learning about quantum mechanics.
- vikiomega9 10y ago> unlikely to guide you into learning about quantum mechanics True, but that depends on assuming the person teaching is really only interested/aware of an answer that deals with refraction, and that the median mental model most people have isn't close to understanding the mechanics of refraction. I've noticed that the levels of abstractions we employ are all affected by these sorts of questions, perhaps the same question a year later would afford one the chance to unravel a particular layer assuming the layers above it are sufficiently saturated in understanding :D
- Ologn 10y ago> Your code will be in production either much longer or much shorter than you think it will. The 5 lines of code you spend three days perfecting will be replaced in a week, and that one-line 3am hack will be out there for ten years. On that note, I was surprised to see this comment when looking through the source code of the now-venerable program traceroute - "Don't use this as a coding example. I was trying to find a routing problem and this code sort-of popped out after 48 hours without sleep. I was amazed it ever compiled, much less ran. [...] Van Jacobson (van@ee.lbl.gov) Tue Dec 20 03:50:13 PST 1988"
- graycateyes 10y ago>You will derive more long-term benefit from finding an answer yourself than finding that answer on Stack Overflow, at the cost of time. When time matters, at least try and understand why the Stack Overflow answer is right. Absolutely agree! You have no idea how much I have learn from reading the official documentation of whatever tool I am using vs a basic stackoverflow answer with little explanation.
- scriptkiddy 10y ago> What the customer needs is rarely what they say they want. I'd like to extend this to include designers, non-technical cofounders, and non-technical colleagues. I had a situation just recently where I built out a new front end interface for a new feature I had just built. There was a particular work flow that I had carefully laid out for a specific task that involved rearranging items in a list. Not having a 100% explicit spec, I was free to improvise within constraints. So, I built this interface out and tested it.I then handed it over to my colleague who is responsible for green lighting new features and such. Well, my colleague decided that the interface should be completely rebuilt for better usability. That's fine. No problem, that's my job. Though, it would have been nice to have a spec up front so I don't have to throw away hours of work. So, I convince my colleague to write out a very detailed user story so I can make the interface just how they want it. I get the user story and I completely rebuild the interface. I then hand it over to the same colleague and they say that the interface still needs improvement. I'm confused at this point because I followed the spec to the tee. They explain how they want to improve the interface and their explanation sounds almost exactly like what I had implemented the first time! Needless to say, I was a bit ticked off. That said, it's best not to make a big deal out of it as I am getting paid for my work and I don't want to make my colleague defensive. Luckily, I had the old version in version control on another branch so I was able to pull it back into the working branch and make some minor tweaks. Moral of the story: Non-technical people don't really know how to express what they want to a technical professional. I'm in no way implying that non-technical people are inferior. They just don't understand the job of a technical person and all of it's implementation details. The same issue applies to fields other than software development. For instance, it's difficult to express how you want a contractor to build something if you have no experience building something. You will also run into people that have no idea how to do your job and have no idea how to express what they want, but also insist that your job is easy. These people are idiots. You just have to humor them until they inevitably fail at their own jobs and go away.
- samch 10y ago> You're going to read your code 100x more than you're going to write it. Optimize the code you write for reading. A bit of a tangent here, but this is why I could never bring myself to use Scala. At least early on, their pitch for the language was frequently backed by code comparisons where many lines of relatively verbose Java would collapse neatly into just a few lines of Scala. For me, at least, I had the realization that even if I figured out exactly how a particular block worked, revisiting it later would be a huge challenge in terms of re-learning. Java has proven itself to be a lot more readable and self-explanatory.
- Yhippa 10y ago> A good walk around the block will help you solve a problem faster than staring at code. This has really helped me out with some nasty bugs.