Better HN
topnewbestaskshowjobs
Log inSign up

shortrounddev2

2,427 karma · joined Jun 15, 2023 (3y ago) · 1,641 submissions

Submissions

comment 3y ago · link · parent

> Downloading sketchy freeware from third parties is Windows culture

No, it's "computer illiterate" culture. Windows has a few package managers available these days (including a first party one). Developers on windows install things the same way that linux users do, though not usually building the software along the way (though I often have to use cmake with visual studio)

comment 3y ago · link · parent

I think it's pretty common these days to have people git clone a repo and then build it. Not everything is on a package manager, and I see fewer new things on aptitude. At best, they're available as modules in npm or pip to be installed globally

comment 3y ago · link · parent

My T420 is still running strong 12 years later. I don't use it for much since I'm not on Linux anymore, but I occasionally open it up and play with it. I'm using a Dell Inspiron now and I'm hoping it lasts a while.

comment 3y ago · link · parent

Someone got paid to write this

comment 3y ago · link · parent

I hate Apple, its products, and its ecosystem. The developer tools suck and macOS provides no advantage over windows other than an annoying user interface (if you're into that sort of thing)

comment 3y ago · link · parent

Very cool; it's nice to see some development in this area since it seems very lacking compared to graphics frameworks. Afaik, the only real options for indie engine developers is PhysX, Bullet, or ReactPhysics3D. I'm unable to get consistent behavior in ReactPhysics3D, and Bullet has notoriously terrible documentation. PhysX has served me well but it would be cool to see a more diverse ecosystem

comment 3y ago · link · parent

My preference is to have my types defined in code first, rather than in markup language files which generate the code. Having to rely on 3rd party code generation tools because your language lacks a feature is, as I see it, code smell. I'm not sure how to handle the scenario of undefined fields in a PATCH, but I also don't tend to write APIs that way

comment 3y ago · link · parent

No, I'm sure you have your reasons, but deserializing and validating is much more painful in typescript than it is in .Net or Java so I'm not sure why you would choose that

comment 3y ago · link · parent

I love C#. At work, when I write standalone tools, I always do them in C#. My boss tolerates this since I'm usually the only one using them. But I don't get to choose what our backend is written in

comment 3y ago · link · parent

The solution is to pile features onto typescript that were never intended to be there, the same way we have done with Javascript, HTML, CSS, and HTTP. None of these things are pure, and all of them have been ravaged by competing interests and committees who were all making financially driven decisions when writing the standards.

It would be best to abandon javascript and typescript as backend languages. I don't mind them on the frontend because a typescript compiler is useful when the application you're writing is originating data and not receiving it. And javascript does DOM manipulation admirably. However, we live in a world where humans are more expensive than computers. If I had my way, we'd write C# backends and Angular/Typescript frontends, but that's not the world we live in. Everything has to be JS because most people employed as "software engineers" are not truly very good at their jobs

comment 3y ago · link · parent

There is currently no good way to automatically validate the object input to a typescript API. In the way that you can simply specify the class of a POST body to a spring boot controller or Asp.Net controller, every class in typescript requires you write the type information twice: once for the typescript compiler, and once again for the runtime deserializer, in the form of decorators. Having to write extra code to make up for a deficiency in your framework, runtime, or language is the definition of code smell. As such: all typescript backends which attempt to properly validate user input are guilty of egregious codesmell.

Additionally, because it is impossible to emit these types to the runtime, even in the form of a string naming the type, you cannot validate input to an API using generics. If you have, say, a class which will run a query for a record based on the keys in that record:

    class Query<T>{
        filter: Array<keyof T>
    };
The typescript compiler can validate if a string in "filter" is, in fact, a key of the class T. However, you cannot write any decorator on this class to make the information of what keys exist on T available at runtime. Therefore, to write such a query interface and validate it at runtime, every record which can be queried with this object must have its own specific "[Record]Query" class written with its own decorators to validate every possible input, usually with the valid keys hardcoded into the decorator.

Because there is no real relationship between the class and the runtime validators, this makes validation more error prone, because it relies on either human beings to consistently remember to add new fields to the relevant decorators, or a custom linting tool to be written which basically pre-processes the typescript source using the typescript API. This is, again, writing code to account for the lack of features in the framework.

WHY do we put up with this crap? We have had Java and C# for a long time, and they solved these problems a long time ago. Why are we writing Typescript on the backend?

The simple answer; it is easier to find javascript developers than it is to find java developers. Bootcamps don't teach Java or C# because there's more react jobs out there. Bootcamp grads are not generally coding enthusiasts and so re-tooling is difficult for them and they don't generally do it for fun. So, we decided to write our backend in Javascript (or Typescript) as a labor decision, not a technology decision.

comment 3y ago · link · parent

There are plenty of ways to emit runtime type information statically without a runtime. `keyof` could statically convert to the list of keys in a class. Hell, even typescript classes could do what ES6 classes do and initialize class keys to undefined. Currently, typescript classes erase all keys unless explicitly defined. Object.keys() on a newly instantiated typescript class without set members will return nothing, while an ES6 class will return all of the keys. Just an option in tsconfig.json to convert TS classes to ES6 classes (or just allow ES6 classes to exist at the same time in Typescript) would make some code generation WAY easier.

Or some kind of syntax to emit the name of a type as a string. Currently, if you run `typeof foo` it will return the type as a string. If you could have a static version of that, like `tstypeof foo`, or with a class:

    class Foo {
        bar: string;
    };

    console.log(tstypeof Foo::bar) // or something less C++-looking; compiles to "string".
then it would be killer. This could break compatibility if you change the type of a field and a compiled client using the code were to expect "string" when it's been changed to "number". But I'd rather live in that world than the one we live in now

Just some basic RTTI would make a lot of ugly codesmelly boilerplate Typescript code evaporate instantly.

comment 3y ago · link · parent

But do the millions you spend a year on compute cost more or less than the millions you would spend a year in labor finding the increasingly rare breed of C++ developers who can optimize things for instruction or cycle count? Such developers usually have over a decade of experience (if not multiple decades). Python developers are a dime a dozen, comparatively

Plus, instruction and cycle counting is low hanging fruit compared to memory latency. You can cache-optimize a program in any language so long as the memory representation of some data is relatively transparent.

comment 3y ago · link · parent

The reason we want typescript to have java-like features is because we work on teams which have decided, outside of our control, that we are going to write our backend in JS/TS simply because it's easier for the bootcamp grads to transition to backend since they already know JS on the frontend. If we wrote our backend in Java, it would require the bootcamp grads to learn a new language, which they're not prepared to do. Choosing typescript or javascript on the backend is not about choosing the right tool for the job (because they are objectively not the right tool for backend development). It is mostly about minimizing the cost of our labor sourcing

As such, RTTI would make typescript go from a compromise language (we use it because we are stuck in the JS ecosystem, not because it's a good tool) to a legitimately useful backend language (We use it because it has the right features for the use-case)

If I could choose what language we use on the backend, I would leave the JS ecosystem entirely and write everything in .Net. But it's difficult to find .Net developers since every bootcamp these days produces react developers

comment 3y ago · link · parent

Quite often, the choice of language is failing to see the forest for the trees. Saving nanoseconds or cycles because you chose C++ over Python pales in comparison to milliseconds spent at network barriers reading from a cache service or database

comment 3y ago · link · parent

I don't know LLVM, but I would assume that LLVM is more rigidly defined and has less UB and more explicitly defined outcomes (e.g: less implementation defined behavior)

comment 3y ago · link · parent

> That in turn will remove some of the incentive for companies to go office-less.

The #1 incentive for office-lessness is access to a cheaper labor pool. If you require people to come into the office, you have to pay rates that match the cost of living in the area, even if they are hybrid. If you go totally remote, you can hire people in countries that will accept a third of what an American in a big city will accept and still be excited about it.

comment 3y ago · link · parent

I schedule as few things as possible and mostly just go with the flow, doing things when the fancy passes me

comment 3y ago · link · parent

You can have it generate things without the censorship. I saw an article in WaPo saying that some people use it for cybering

comment 3y ago · link · parent

Millions isn't really a high bar for revenue in software

comment 3y ago · link · parent

My default tech stack is .Net on the backend and Angular on the frontend. MS Makes this easy by just running `dotnet new angular`. Database changes depending on what I'm doing, but I use SQLite for local dev and usually postgres for deployment. I started out as a LAMP developer.

comment 3y ago · link · parent

I haven't found any good feature phones in 2023. They all have shortcomings or bugs that make them useless to me. They're also all really boring and ugly these days (like all electronic devices).

The one "retro" thing I find myself using most is my Casio digital watch

comment 3y ago · link · parent

I'm not sure what you mean. It works for me

edit: oh, when I do it in incognito (not logged in) I see the new UI. I guess I haven't logged out of reddit in a while

comment 3y ago · link · parent

I'm getting bored with web development. It feels like so much of my job is just accounting for the shortcomings of the frameworks we use, and we chose our frameworks so that our bootcamp grads can write javascript on the backend and don't have to learn java or C# or something which would make our backends a lot easier to work with.

I do DirectX Graphics and native programming for fun on the side, but it doesn't seem like there's any good money in it. I look up DirectX jobs but a lot of them are AI using GPU pipelines, and AI is really uninteresting to me

comment 3y ago · link · parent

I never subscribed to newsletters, and email has become totally useless noise to me

comment 3y ago · link · parent

Personally I don't prefer the SQL syntax in Linq. I like using EF Core, but with regular C# style statements

comment 3y ago · link · parent

EF Core is my favorite ORM. Some Java ones are alright, and Javascript ORMs all suck because of the lack of RTTI. I try to keep my webapps as cruddy as possible and do complicated things in application logic with transactions for atomicity. I don't like relying on SQL

comment 3y ago · link · parent

Spam LinkedIn connections

comment 3y ago · link · parent

Current company, Auth0. Personal projects, Facebook

comment 3y ago · link · parent

I work in adtech so I have to disable it occasionally
1
5152535455