Without judging the author, I think it's fair to say there's nothing to be learned from this article by 90% of regular HN readers.
What I've Learned So Far as a Programmer
41–50 of 62 posts
Re: What I've Learned So Far as a Programmer
#42Some stuff I learned: Don't write/use abstractions you won't understand later. Often you start with 2-3 copies, try to merge them and end up using it at a place were it doesn't fit 100% anymore. Keep nesting low. Often it's faster to scroll over one big okay-ish structured function than to find all the clean tiny things around the the project. Same goes with Objects/Classes/Components etc. Stop using abbreviations an…
This so much. One of the bigger differences between academic and professional coding is software system longevity.
Premature refactoring is incredibly harmful to readability.
1. You have no idea what the future will require. You will always know more about the requirements in the future.
2. You have no idea how the current use and system will need to evolve. You will always learn more about this in the future.
3. You have no idea how long the current system will be used. Could be 20 years; could be a week (if it's an executive's pet project).
4. Time to MVP > perfect code in almost all instances.
Writing code with clean, documented potential refactoring points, but stopping short of actually pulling all those things apart has served me far better than the alternative.
If you have one function that may not be applicable to a future use case, and you refactor it into two, now you have two functions that may not be applicable to a future use case.
Develop a feel for what's "reasonable" in an initial write, and don't code yourself into an inflexible corner, but defer actual refactoring until it's necessary. Because then you'll have the benefit of knowing far more about the new needs and how the system is used.
Re: What I've Learned So Far as a Programmer
#43Always build scalable web presences.
When I was on the front page of HN, IIRC it meant about 5k visits in an hour. How can such a low number kill a webpage... Or do other on the front page experience much higher traffic?
Re: What I've Learned So Far as a Programmer
#44Earlier quoted context omitted.
I hope to once make the frontpage on HN. Not for the fame or anything, just to check how scalable my blog really is. :)
Do you know of any way of testing your website to see how many concurrent users it can handle?
It can bring down most servers that aren't configured to prevent DOS attacks, like naive nginx or Apache configs. Usually somewhere between 5-10mins.
Re: What I've Learned So Far as a Programmer
#45Complicated things break. Simple things also break, but a lot less often.
Re: What I've Learned So Far as a Programmer
#46Everyone is so smug here, wow. If you have a little web presence with 5 visits per day, of which 3 are bots, you don't cache, you don't use AWS or any of the big services, you just spin up a tiny Linux machine with a LAMP stack and that's it.
Is there a good (preferably free) service to load test ones own website? I imagine that something like this is quite hard to test for a beginner and I admit I have never tried to do it on my site either.
Re: What I've Learned So Far as a Programmer
#47"Error establishing a database connection" The greatest knowledge by experience for all for us in devops.
> THE BIGGEST LESSON I LEARNED TODAY
> Don’t forget to turn on your caching plugin and CDN. I submitted this blog post to Hacker News and this website can’t be accessed.
> And I HOPE it won’t crash right after I wrote this. I hope! Haha.
Haa... nice.
Re: What I've Learned So Far as a Programmer
#48Re: What I've Learned So Far as a Programmer
#49" It doesn’t matter if you don’t know algorithms… But it doesn’t hurt to learn about it (because it might help you in the future). This is important. Usually you don’t use algorithm in programming a system but if it’s something that will scale fast, your understanding of algorithm might be useful. " Sigh. I'm really tired of this misunderstanding. Literally everything you type in to an editor is an algori…
Re: What I've Learned So Far as a Programmer
#50The most important lesson I've learned is simplify . Simplify everything. Simplify your problem. Simpilfy your approach. Simplify your architecture. Simpilfy your data model. Simplify your build process. Simplify your release process. Complicated things break. Simple things also break, but a lot less often.