Live data from Hacker News

Skills Poor Programmers Lack

justinmeiners.github.io

71–80 of 211 posts

Re: Skills Poor Programmers Lack

#71

> You may have seen code which misunderstands how expressions work: > if isDelivered and isNotified: isDone = True else: isDone = false; > Instead of: > isDone = isDelivered and isNotified Are people actually finding code like this in professional work or is this just an example? I'm self-taught and know I've got some gaps, but this example is so fundamental I find it shocking.

yes, and that's a pretty tame example. Don't assume that any code you see is correct. A lot of misunderstandings about how a language works can be carried on for decades within a team.

Re: Skills Poor Programmers Lack

#72

> I believe OOP and relational database get a lot of flack Who gives relational databases flack? The RDBMS and SQL is the cleanest, simplest, and most productive technology stack I've ever used.

I've encountered a growing trend of programmers whose experience is mostly on the front-end avoiding dealing with their own database at all and just using Firebase or even DynamoDB for everything.

I personally find an MVC backend framework with Postgres to be the most productive option, but a lot of people disagree.

Re: Skills Poor Programmers Lack

#73
The skills cited in the article are:

1. Understanding how the language works. Additionally understanding how the language infrastructure interfaces with the computer.

2. Anticipating problems. Prefer solid foundations over veneers that appear to get the job done.

3. Organizing and designing systems. Essentially, SOLID.

Two things on this:

First, bad code often results from conflicting goals. Moving goalposts and on time shipping, for example. The result appears to have been written by a poor programmer, when this may not be the case.

Second, the most valuable skill a programmer can have isn't technical, but rater social: empathy. The best programmers I've seen have it and the worst completely lack it.

Lack of empathy leads to poor communication. If programmer can't anticipate or read his/her audience's perspective, there's no way s/he can communicate a complex concept to them. The temptation will be to blame the audience when in fact the failure lies squarely with the programmer doing the speaking or writing.

Lack of empathy also leads to disregard for the needs of users and future maintainers. Systems get built that don't need building, and systems that should be built aren't. Should the two happen to coincide, the system is a nightmare to maintain because the programmer simply didn't care about the people who would need to maintain the contraption.

A lot of the 10x programmer discussion focussed on people who lack empathy. For some reason, it's easy to conflate lack of empathy with technical skill.

Re: Skills Poor Programmers Lack

#74
i call bs on this kind of observations and all advice that claims you need to know A,B,C to be a “real programmer”

imho, you need to 1) be curious 2) continuously learn and want to improve 3) don’t make the same mistakes over and over again 4) share your thought process and be willing to both learn and teach others

yes, sometimes the delta in level of experience is inconvenient but we are all somewhere in our journey. be nice to others.

that is all.

Re: Skills Poor Programmers Lack

#75

Well, where he says "You may have seen code which misunderstands how expressions work: if isDelivered and isNotified: isDone = True else: isDone = false; Instead of: isDone = isDelivered and isNotified " I think that's a matter of style, I prefer the isDone = isDelivered and isNotified style myself, and I think the people who write the other way have very poor style but as arrogant as that sounds I don't think I woul…

In college they taught me that every line of code should do one thing and one thing only. So doing both a test and an assignment on one line would not be prefered over the first example(split over multiple lines). I don't have a lot of experience with programming so for now I do what I was taught. :)

Re: Skills Poor Programmers Lack

#76

> I believe OOP and relational database get a lot of flack Who gives relational databases flack? The RDBMS and SQL is the cleanest, simplest, and most productive technology stack I've ever used.

I don't think you understand. Maybe this video would help enlighten you on the subject.

https://www.youtube.com/watch?v=b2F-DItXtZs

Re: Skills Poor Programmers Lack

#77
In all fields there is a minority who are not very good at what they do. I think, though, that in programming that minority might actually be a majority. The thing is, if you are a poor plumber who causes floods in peoples houses you are not going to be in business for a very long time. In programming there seems no such discipline because it actually takes somebody good at programming to perceive the difference between good and bad programming. And if the programming project is a disaster right now the cause of this might be bad decisions made 5 years ago and the people who made them are already gone thereby shielding themselves from the consequences of their actions. In a healthy programming department there should certainly be a small influx of new people and new ideas but also the stability of people who see the project as their personal responsibility.

Re: Skills Poor Programmers Lack

#78
>I believe OOP and relational database get a lot of flack because programmers tend to be bad at design, not because they are broken paradigms.

OOP has Fundamental and Intrinsic problems that can be described in a very concrete way.

If you believe OOP gets a lot of flack just because programmers are bad at design, then you are the one that is also bad at design.

I will say this, OOP is bad for many and most design problems, and most people who hate OOP also don't even know why OOP is bad. They just have this gut feeling and bad experiences but they can never pinpoint the concrete reason for why OOP tends to lead to bad designs. A lot of people who like OOP, really like the mind bending design patterns but they don't realize that these patterns often offer limited flexibility and the catharsis of creating a design pattern abstraction is just an illusion.

So really what's going on is nobody knows the true nature and goal of design in programming. There's no theory behind it. To first know why OOP is bad you need to know the fundamental nature and goal of design when it comes to programs.

The goal and nature of design is abstraction. When designing programs we want to start from primitives, then compose those primitives into higher level abstractions, then take those abstractions and also form those into even higher level abstraction until we achieve the final level of abstraction that represents the program itself. The key insight here is because everything starts with a primitive, the way your abstractions are designed, depends entirely on your primitives and choice of primitives.

A good primitive must be able to additively compose with other primitives to form every other possible abstraction that the program may possibly need. "Additively" being the keyword here because if you subtract information from your primitive during composition it means your primitive is not "primitive" enough and that in actuality the "thing" your dealing with may be two primitives representing what you tried to "subtract" from the primitive and the remaining part of the original primitive itself.

Bad design often involves dealing with bad primitives. You may find yourself realizing that you have abstractions that cannot be built out of the composition of the primitives that you have. You may find that you have to split up one of your primitives and realize that since it's all encapsulated in a micro-service there's no easy way to do this, so you take on technical debt by making a redundant component that does what you need. You may not even have a notion of what the primitives of your programs are and designed things at the highest level of abstraction with Zero code re-use. 99.999% of all programmers will not have a notion of what primitives are, and design programs in a way where they have a potpourri of components that are a mishmash of high level logic combined with low level logic and no notion of forming higher levels of logic with lower level composition of primitives. Yes 99% of programmers are like this, literally take a look at yourself and your colleagues and tell me who out of all them actually has linked the notion of the "design of programs" with "choice of primitives." In fact the entire blog post never mentioned the word "primitive" or "axiom" once in the entire write up on design.

Which brings me back to the initial topic of why OOP is bad:

OOP is bad because the object is a bad primitive.

Objects are actually arbitrary mixtures of lower level primitives: functions and data. It is far easier to compose functions with functions and data with data than it is to compose these arbitrary mixtures called objects with other objects. Object compositions often involve surgical grafts of one object into another object resulting in a hideous dependency. A lot of people like to use tricks and have this happen at runtime; People tend to call it dependency injection, a very abstract and clever concept but also very very very bad.

Meanwhile composing two arrays:

   [1,2,3] + [4,5,6] = [1,2,3,4,5,6]
Composing two functions:

   function compose(f, g) {
      return function(x){
         return f(g(x))
      }
   }

   b = function(x){return x+1}
   c = function(y){return y*2}
   a = function(j){return j-3}
   d = function(e){return e*e}


   g = compose(b,c) // g(x) = (x*2)+1
   t = compose(a,b) // t(x) = (x+1)-3
   l = compose(d,d) // l(x) = x*x*x
... you get the picture.

Re: Skills Poor Programmers Lack

#79
> On the other hand, what if you generate storage files with random names and you have a collision? You just lost someone’s data! “This probably won’t happen” is not a strategy for writing reliable code.

If the entropy is high enough, and the likelihood of collision low enough, then this is a very useful tool for certain situations, particularly distributed systems. I suppose IPFS (and even Ethereum) was written by "poor programmers"?

Post reply on HN