TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How I became a better programmer (2017)

430 点作者 _ttg大约 5 年前

22 条评论

jaequery大约 5 年前
About a decade ago when OOP was just booming in the PHP world, I wrote my own database abstraction layer because I was a bit tired of the ORM&#x27;s that existed at the time (Doctrine, Propel, ZF). Taught me what makes a beautiful fluent interface and the difficulties of achieving them. Helped me to think about UX experience at a code level, trying to achieve an interface for developers that fits all ages. That was an eye opening experience.<p>Then I wrote an MVC framework from scratch because I thought others were too heavy (ZF, Symfony, etc). It helped me understand an application development at a deeper level, figuring out the best strategy for code modularization, organization, and performance. It helped me to learn creating something that looks so painlessly easy to use is a pretty difficult task (there will always be something ugly sticking out). It took me on a ride of what happens with extreme level of abstractions breaking up code for each roles and a simpler route much like the Sinatra &#x2F; Express bootstrap approach.<p>I&#x27;ve found a new level of respect for those who develops codes at a macro-level (frameworks &#x2F; libraries). There are lot of thoughts and love been applied to them. DHL (Rails) is up there, as well as John Resig (jQuery). I&#x27;ll also give a shout out to Sequel (Jeremy Evans) while at it for creating an ORM that is almost perfect. Vue.js (Evan You) also particularly deserves a lot of credit for what he is doing in the front-end world. I like React too, can be fun, but I did not like the whole Redux experience.<p>I think what makes a great programmer is that they are able to think at a macro-level, thinking about how &#x27;others&#x27; will use and apply the code, and making it look deceptively simple.
评论 #22680917 未加载
评论 #22682899 未加载
评论 #22681281 未加载
评论 #22682090 未加载
Crazyontap大约 5 年前
My comment is a little tongue in cheek but Here is &quot;How I became a more productive by becoming a worse programmer&quot;<p>- I stopped worrying about best practices and just do it.<p>- I hardly refactor my code unless I&#x27;m using the same thing for the fifth time. I just copy-paste it instead.<p>- I never think about optimizing code until I really really need to.<p>- I write what gets the shit done quickly. I don&#x27;t care if writing a Class would have been better than a function.<p>- I love old boring technologies and believe you can still make amazing websites with just PHP and jQuery.<p>- I don&#x27;t come up with clever one-liners anymore. I write a 10 line <i>for</i> loop which I could easily replace with a clever one-line code golf.<p>- Instead of writing my own code, I usually search Stackoverflow first to see if I can do some copy-paste it instead.
评论 #22681208 未加载
评论 #22681222 未加载
评论 #22680717 未加载
评论 #22683809 未加载
评论 #22682648 未加载
评论 #22684421 未加载
评论 #22681386 未加载
评论 #22681743 未加载
评论 #22683469 未加载
评论 #22681890 未加载
评论 #22683149 未加载
评论 #22681143 未加载
评论 #22681367 未加载
评论 #22684121 未加载
评论 #22682420 未加载
评论 #22681593 未加载
kqr大约 5 年前
The points on the fluff in particular resonate with me because idespite being a fairly good software engineer, I would say it was only recently I truly started seeing past the fluff.<p>However, typing this out, I realise I would have said the same thing 10 years ago, and 5 years ago, and I probably will again another 5 years from now.<p>I think the truth is that we&#x27;re <i>always</i> missing the forest for all the trees -- only at increasing levels of abstraction: at first, everything is foreign, then syntax becomes fluff, then APIs become fluff, then patterns, then languages, then compilers, then ... I look forward to learning what the next level of fluff will be.<p>&gt; The majority of the stuff being released every day is just a rehash of the same ideas. Truly revolutionary stuff only happens every few years.<p>Maybe not even that often. I can recommend Old Is the New New by Kevlin Henney for a good, historical perspective on how little actually changes sometimes: <a href="https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=AbgsfeGvg3E" rel="nofollow">https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=AbgsfeGvg3E</a><p>Edit: now this was more interesting than I anticipated. What <i>is</i> the next level of fluff? Concurrency? Advanced data structures? Phrasing problems for SMT solvers? Probabilistic modeling?<p>Or are the things I picture as fluff just specific techniques, because the next level of fluff is so meta I wouldn&#x27;t even recognise it now?
评论 #22679324 未加载
评论 #22679857 未加载
评论 #22679437 未加载
movedx大约 5 年前
Also learn how to run a business. A weird suggestion on the surface but actually very powerful when understood.<p>In short by learning how a business operates, how cash flows and how expensive things are (people, buildings, software, hardware, accountants, lawyers, ...) you&#x27;ll begin to understand why an MVP is a powerful tool. you&#x27;ll also appreciate Agile development practices more too.<p>With an MVP you&#x27;re writing the least amount of code possible, and skipping optimisations, whilst also providing some value to people who can tell you what direction to go in next. That&#x27;s a business thing - the business needs something in the market ASAP and it needs feedback ASAP. Without this you&#x27;d write your stack for three years and then release to a world that moved on two years ago.<p>When you learn how a business is run you begin to understand that getting to market with a less than ideal code base is actually desirable and something to embraced. All of sudden you&#x27;ll come to understand that money burns quickly so you should learn to develop code to get to market and not to be the fastest code it can be (yet, at least.)<p>I find the best programmers I&#x27;ve worked with are those that can produce something quickly and optimise it later on.
评论 #22680579 未加载
augustk大约 5 年前
&quot;The most experienced programmer uses hacks all the time; the important part is that you&#x27;re getting stuff done.&quot;<p>I couldn&#x27;t disagree more, the grown up programmers use a strategic approach, not a tactical one. As Jonh Ousterhout put it in his book A Philosophy of Software Design &quot;The first step towards becoming a good software designer is to realize that working code isn&#x27;t enough.&quot;
评论 #22685603 未加载
评论 #22684278 未加载
评论 #22685472 未加载
Twisol大约 5 年前
&gt; Here&#x27;s a question I like to ask: do you spend most of your time making your code look &quot;nice&quot;? If so, I recommend not focusing on it so much. [...] It&#x27;s better to focus hard on the core problems you&#x27;re trying to solve and think hard about your layers of abstractions.<p>Absolutely. Modeling what you&#x27;re trying to do in code is a critically important task, and a most surface-level grime is forgivable if you have an understandable foundation.<p>However, I worry that if you focus on the first half of this block, you might think the abstractions aren&#x27;t important. To a lot of new programmers, abstractions and models are <i>themselves</i> merely &quot;nice&quot; -- if you can get it done without them, clearly they&#x27;re non-essential, right?<p>I believe that most code is read more often than it&#x27;s written. (You pass through a lot of code while tracing down bugs!) It pays to reduce the brainpower necessary to understand a block of code, and good abstractions and good models are key to this.
评论 #22679974 未加载
评论 #22679936 未加载
评论 #22679929 未加载
uk_programmer大约 5 年前
Some of it this was spot on, especially doing research. Very rarely you will be doing something completely novel and it always good to look at how other people have solved a problem.<p>However the old &quot;Learn C&quot; and &quot;Write a compiler&quot; which are within meme territory tbh. It is more important generally to understand what a particular in whatever language you are using to know what the compiler &#x2F; interpreter &#x2F; run-time is doing under the hood as most developers will be working with a high level language.<p>I&#x27;ve seen a lot of &quot;how to improve as a programmer&quot; articles and IMO what seems to be left out is learning how to do things as simply as possible. Many of the software systems I&#x27;ve worked on is so over-engineered, many simple websites are huge both client and server side and they usually don&#x27;t warrant it.
funylon大约 5 年前
&quot;I stick things on the global object until I know what I&#x27;m doing.&quot; Magical sentence that.
cryptonector大约 5 年前
&gt; Understand continuations - Continuations are a low-level control flow mechanism.<p>Excellent advice right there!<p>&gt; Scheme is the only language to implement them, and while you will never use them in production, they will change how you think about control flow. I wrote a blog post trying to explain them.<p>Hmm, well, many languages compile to a continuation passing style (CPS) intermediate. And in many languages it is important to understand continuations to understand how they work. For example, laziness in Haskell is essentially all about continuations and continuation passing style.<p>What is CPS? Anyone who has been in callback hell knows. In CPS a continuation is just the closure you pass to some function that it will call when it&#x27;s done. In fact, even in C, the act of returning from a function is very much like the act of calling a continuation, except that by unwinding the stack, the magic of Scheme continuations is lost.
评论 #22682982 未加载
xwdv大约 5 年前
I became a better programmer once I committed to mastering Vim.<p>Don’t know why, but the whole struggle of using it changed the way I thought about code and I gained the power to code at the speed of thought.
评论 #22681470 未加载
codr7大约 5 年前
Once you know a handful of different programming languages, write an interpreted language embedded in your preferred host language.<p>It doesn&#x27;t have to be fancy, I recommend using Forth or Lisp as a starting point; but write something real, do your thing.<p>I find that most compilers are toys and replicas of existing languages on top of that, which misses the point of designing your own tool.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;gfoo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;gfoo</a>
mit_cs大约 5 年前
Your reasoning for learning C is biased (perhaps you don&#x27;t know it well as you suggested the others to know the basics)! At the end, hardware understands only values. C is a minimal, efficient and readable language which survived for decades although there are hundreds of other programming languages. It remains an active programming language as long as there is a good compiler support.
评论 #22683671 未加载
dang大约 5 年前
Discussed at the time: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13918888" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13918888</a>
jacobush大约 5 年前
How <i>I</i> became a bitter programmer. (1995-2020)
sp527大约 5 年前
Doesn’t expound upon two of the most important things: (1) focus on business value over technical challenge (if anything this preaches the opposite) and (2) learn how to get as close as possible to the global optimum in the 3D space formed by time, cost, and quality, depending on the situation.
评论 #22682173 未加载
collyw大约 5 年前
One thing that helped me a to was to build a system myself and maintain it for a few years. That way you see what areas come back and cause you trouble over and over again.<p>If I didn&#x27;t understand a bit of code I wrote a few months ago, it was probably too complex and worth refactoring. As it was my own system, I couldn&#x27;t blame anyone else&#x27;s poor design decisions.<p>I noticed that keeping the logic as close to the database was generally the way to go. Avoiding changing the database schema and making up for it at the application level was basically adding technical debt.
yagodragon大约 5 年前
I&#x27;ve heard so many things about Clojure. I am a CS student with some experience in the most used languages (JS, java, python). Can someone explain in simple cs terms why Clojure is sooo hyped? What can I do with this language that would be harder with other languages? From what I&#x27;ve gathered it&#x27;s used in data wrangling and manipulation in general but most data-oriented tools are written in Python.
评论 #22679906 未加载
评论 #22679855 未加载
评论 #22681421 未加载
评论 #22681213 未加载
评论 #22683563 未加载
gchamonlive大约 5 年前
SICP is really cool! I would follow up with Practical Common Lisp right after, for insight into a more usable Lisp dialect.
LessDmesg大约 5 年前
TIL Scheme is the only language that implements continuations.
marta_morena_23大约 5 年前
&quot;Don&#x27;t spend much time on making your code look nice&quot;...<p>Well, thanks a lot. You just made your code much harder to read, improve, change and check for correctness. This is actually a self-contradiction. If the code changes often, then its even more important to make it &quot;look nice&quot;. This is something that beginner programmers don&#x27;t get on several levels: Nice code<p>* can be reviewed more quickly (broadcasting effect)<p>* can be checked for correctness much more easily<p>* is pleasant to work with<p>* can be changed more easily<p>* can often even compiled into more efficient machine code<p>The reason why beginners (and this is not about time invested! Many programmers still are beginners after 30 years in the field) think code doesn&#x27;t need to look nice is mostly because<p>1. They don&#x27;t consider that most of the cost of code comes from maintenance. Writing it is really A FRACTION of the time people will spend with your code over time.<p>2. They don&#x27;t consider that creating bugs is one of the most expensive parts of software development.<p>3. They don&#x27;t consider that code is read far more often than it is being written.<p>4. They are simply not ABLE to produce good code and doing so would take them a lot of time.<p>Now giving the advice to not focus on good&#x2F;nice code is a recipe for staying a beginner for the rest of your life and making every project your work on a nightmare for everyone else involved.
评论 #22683202 未加载
评论 #22683381 未加载
non-entity大约 5 年前
&gt; But you shouldn&#x27;t do that until you&#x27;ve done some cursory research about how people have solved it before. Spending a few days researching the topic always completely changes how I am going to solve it.<p>Personally this typically ends up in me just dropping the problem altogether
justlexi93大约 5 年前
I feel like learning is a continuous process, technology changes from time to time so might stay updated with all the latest trend.