Live data from Hacker News

The silent majority in software

vadimkravcenko.com

291–300 of 371 posts

Re: The silent majority in software

#291

Earlier quoted context omitted.

As someone who really appreciates strong typing, I will die on this hill - I hate Typescript. Introducing a transpiled typing system on top of a dynamically typed language is a recipe for all sorts of insane complexity, which is what I experience whenever I try to use TS. If you consider all the time and effort it took to introduce types for every NPM project out there, all the development of the language itself, the…

Did a personal web project and chose TypeScript to see what the rage was about. I spent a ridiculous amount of time trying to design types. At some points I couldn't figure it out, or I ran into some limitation of the language to express what I need. So my code has a bunch of exclamation points everywhere to assert that a null ain't coming. It feels dirty. Just too hard to use for me.

A few things you might consider...

Are you using "?" optional fields in your classes/interfaces a lot? If so, do you need to? Unless it's truly optional, you're basically making the type system less useful if you put that all over the place. If you have a lot of sparse objects, it's probably an indicator of a data type doing too much. You might be much better off splitting it into smaller interfaces and using union types when you need combined objects.

Even if you can't do the above, checking for null at the start of a function/block will "prove" to the compiler that it's not-null for the rest of the block, so an upfront check can save you from a lot of "!" assertions.

Even if you can't do either of the above, you can probably use the elvis operator "?." to safely dereference things that might possibly be undefined.

In my experience with typescript, there's a few good rules of thumb and things to keep in mind:

- Prefer "interface" over "class" for describing most data types. Especially plain old data objects that don't have methods. I'd forget about the definition of "interface" you might know from Java. It can be used that way, but it can also be used like you would use "struct" in C

- Use the "Partial" modifier instead of using "?" in the base structure if you need to do something like sparse updates. For instance a pattern I use a lot is:

   interface MyStruct { a: number, b: string }
   
   function update(original: MyStruct, updatedFields: Partial) {
      return {...original, ...updatedFields}
   }
- Always prefer readonly fields and non-optionality.

- If you're not worried about GC pressure, it's almost always better to return a new object than mutate an old one. The spread operator is great for this.

- Within reason, it's better to prefer smaller data structures and use type unions when you need fields from both in one object.

Re: The silent majority in software

#292
post #253

Try criticizing capitalism or "free markets" sometime.

People do that all the time on HN - I can give you a long list of comments complaining that HN is dominated by socialists, communists, Marxists, you name it. We should distinguish between making substantive anti-market arguments and shrill ideological rhetoric—the latter is going to get downvoted (correctly) regardless of ideology because it's against the site guidelines and the intended spirit of curious conversatio…

> We detached this subthread from https://news.ycombinator.com/item?id=32635382.

Well, golly gee, thanks! That's gonna generate some insightful discussion.

I don't recall seeing very much thought to the left of Bernie Sanders/AOC on here (which is to say, left of the entire American mainstream). I'll believe that when I see it.

Re: The silent majority in software

#293
> They do not participate in controversial discussions about Visual Basic or Pascal — they just do their work in those languages without even knowing that there’s so much controversy surrounding their language of choice.

Serious question: are these languages actually controversial? Doesn't "controversy" usually mean people holding strong opinions and frequently disagreeing? I rarely hear anything at all about Pascal or Visual Basic. Maybe they were controversial in the 1990s? Now I'd call them merely unfashionable.

Re: The silent majority in software

#294
post #15

I may belong to that silent majority. I have learnt a lot from the discussions here in HN and other sites, but I rarely participate on them. This post made me think about being a little more active because, sincerely, most of the times it is just laziness what prevents me from commenting anything. In fact, this is my first comment here in HN. Little by little.

For me it's more that I think a comment should really "bring something" : a new perspective or a complement of information. That's why there are places on the internet (like here) where, usually, I don't find the usual online fluff content.

[deleted]

Re: The silent majority in software

#295
post #59

> Sometimes I’ve seen Pull Requests from empty accounts with a brief explanation of what was implemented. They just submit bug fixes, no drama. Over half my coworkers including some very talented developers have no public repos. As someone with almost 200 that always blows my mind. How do you work in software for years and not find some little hole you want to fill. That’s not a judgment call, that’s an honest questi…

I don’t have any public repos because I’d much rather spend my personal time with my family doing non-work things. I think it just comes down to what you value in your personal time. For some people, it is coding. For others, it isn’t. Neither is good or bad.

Re: The silent majority in software

#296

Earlier quoted context omitted.

Would you mind sharing some things that juniors have forced that you think are bad? I’ve recently switched jobs and my team doesn’t write integration tests for our services but rather manually test them with postman. It’s definitely odd and very inefficient.

Not OP, but front end JavaScript frameworks are the first thing that comes to mind as an inefficient antipattern that was forced into the dev mindshare by (effective) mega-cap marketing and jr devs who didn’t know any better.

You may call me junior, although I have over 10 years of programming at different things. But IMO React is hands down best thing happened with frontend. It's beautiful tech. Sometimes I write javascript without frameworks, but I'm doing it just for fun, because I have strange love for tiny code, when entire "webapp" fits in few kilobytes. That's something like demo scene from the old days. I'll never do that for any commercial project.

Right now my position is something like tech lead, at least I do technical decisions in our company. And there's no way I'll allow to write anything complex without React.

And sites are bad not because of React. Sites are bad because of other things. If anything, React helps making sites less bad.

Second best thing is TypeScript. I don't like tooling, though, but I think it gets better.

Re: The silent majority in software

#297

Earlier quoted context omitted.

How else can you spend thousands of dollars an year to get an horrible programmer experience at the expense of performance and data safety? Plenty of people are stuck with Oracle, but starting with it nowadays is something else.

Oracle provides multimaster replication.

Yep. And either the Oracle support is completely incompetent at my workplace region, or the more servers you add to your multimaster replication, the less is your total throughput. Starting at the 1 to 2 change.

I still believe it's a case of the Oracle people being incompetent, and the system technically being able to scale at a rate somewhat larger than 1. But if a potential gain can be acquired for a few million grand, but nobody has the technical capacity to actually acquire it, is the potential actually there?

Re: The silent majority in software

#298
post #59

> Sometimes I’ve seen Pull Requests from empty accounts with a brief explanation of what was implemented. They just submit bug fixes, no drama. Over half my coworkers including some very talented developers have no public repos. As someone with almost 200 that always blows my mind. How do you work in software for years and not find some little hole you want to fill. That’s not a judgment call, that’s an honest questi…

It sounds like you're starting with the assumption that if someone writes software to fill a hole of theirs, that they would almost certainly make it public. I don't think that's true for everyone.

Re: The silent majority in software

#299
post #218

>While browsing HackerNews, I sometimes get the feeling that every developer out there is working for FAANG Bubbles on HN; Entry level Web Developers are getting $200K per year working in FAANG or Big Tech. Non-FANNG are getting $150K anyway. Ruby may be dead, but PHP is even more dead. Java may rule the enterprise, but you should not mention Java. No one uses Oracle or MySQL, why would you want that? Postgres is the…

every website has to be strictly vanilla javascript and no greater than 15kb
Post reply on HN