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

France is a bizarre country to me. In the US, they are often the archetypal left-wing country in terms of economic policy and the size of the state, but culturally and socially they seem very conservative. Somehow a country which has its own English-language Wikipedia article for threesomes is also a country that aligns with Texas on its opinions toward meat

comment 3y ago · link · parent

I will start a fucking union vote before I go back into the office

comment 3y ago · link · parent

Knowing what I know now, if I were Gen Z I would definitely think twice about going to college, unless I was very passionate about a field which required a degree and paid well. I wouldn't go "for the experience". You can bum around in a van on a college campus for free

comment 3y ago · link · parent

If you're a senior engineer, mentoring junior engineers IS your actual job, in addition to the coding work. It's arguably the more important part of your job description because junior engineers write most of the code, so you get far more done via mentoring than you do typing on a keyboard

comment 3y ago · link · parent

I am the same way with my coworkers. I spend a lot of time helping juniors with their code and doing code review. My boss talked to me and told me to stop helping out so much and focus on my own tickets.

comment 3y ago · link · parent

My Nokia lumia was easily the best phone I ever owned

comment 3y ago · link · parent

If you want to learn more about NT, read "Showstopper! The Breakneck Race to Create Windows NT and the Next Generation at Microsoft" by G. Pascal Zachary

comment 3y ago · link · parent

Should add some normal people clothes too. A t-shirt's should seams should sit on top of your shoulders, not down the sides

comment 3y ago · link · parent

Personally I go to ikea because I like to see the showrooms. I like to pretend like I can have this kitchen or this living room, and that my own apartment isn't a disorganized mess. I go to idea to buy a fantasy, not furniture

comment 3y ago · link · parent

A few years ago when I was a Junior engineer, I worked for a company which would provide us with free tickets to any sports team in our city. I'm not a sports fan, but my stepdad loves hockey. When the tickets went up, they got reserved pretty fast.

I noticed that the site we used to reserve the tickets had a predictable slug like: `{company}-hockey-tickets-2016-season`, and `{company}-hockey-tickets-2015-season`. The sites also didn't change between each refresh.

So, when it was nearly time for the 2017 season to start, I wrote a script which hashed a GET request of the site at `{company}-hockey-tickets-2017-season`. If the hash changed, it would send me a text message using twilio, and I would know to immediately get on a machine and reserve the tickets we wanted. After a couple false positives, the page eventually went up before it was announced and I reserved the tickets I wanted.

Unfortunately, the office manager who did these things told me I couldn't jump the gun and un-reserved my tickets. After the official announcement went up, the spots I had originally reserved quickly went to someone else

comment 3y ago · link · parent

idk, anybody under the age of 22 is basically a child to me

comment 3y ago · link · parent

The justice department has absurd ways of determining how much damages were caused by unauthorized access. Kevin Mitnick talks about it in his book "Ghost in the Wires", but he was accused of causing $1.5mil in damages to DEC or Sun or something because he copied code, printed it out on paper, and kept it for himself (he didn't distribute it to anyone else). Fortunately, he was ultimately only ordered to pay a few thousand in restitution.

comment 3y ago · link · parent

I'm happier not using it at all

comment 3y ago · link · parent

> or they might not want their micromanaging manager to know they helped you outside the scope of their work

This is me. My boss lays so much on my plate that I legit get talked to when I help other people. I tell them not to tell anyone I helped them

comment 3y ago · link · parent

I say we should have open borders

comment 3y ago · link · parent

It's performative, like all social media. It's about signaling to your social network that you are an intellectual

comment 3y ago · link · parent

re: Reddit

A lot of the main subs you see on the homepage are not explicitly political subs, but they end up having almost nothing but political content (/r/whitepeopletwitter, /r/facepalm, /r/therewasanattempt) and Reddit seems to ignore me when I block subreddits. So, even though I WAS a reddit addict for 10 years, they changed the formula and now I'm just not hooked anymore. Thanks Reddit!

comment 3y ago · link · parent

I didn't say macos wasn't a target, just that it's less important than other platforms. It's a small share of the market

comment 3y ago · link · parent

Your use of M$ makes it very hard to take you seriously tbh

comment 3y ago · link · parent

My company provided a macbook pro but I stopped using it shortly after starting and do all development on my windows laptop

comment 3y ago · link · parent

Did you ever use Visual Studio on mac? It's not the same thing as VS on Windows, at all. They just bought another IDE and rebranded it. If you want to do Cross platform .Net development, I would use VS Code for it.

Plus, when they said "cross-platform", I think they were thinking more about backend linux than they were about frontend mac/iOS.

comment 3y ago · link · parent

The solutions you described are hacks, at best, trying to compensate for the deficiencies of the language.

I have never wanted to share code between frontend and backend other than classes/type information. I don't know why you would want to repeat code

comment 3y ago · link · parent

I was once accused of mansplaining by a marketing intern. I assured her that if I sounded like I was talking down to her about a technical issue, it was because she is in marketing, not because she's a woman

comment 3y ago · link · parent

I have personally come to the conclusion that typescript should not be used for writing a backend. The lack of RTTI means that you have to either write a TON of verbose code mapping Typescript class fields (note: different than ES6 classes, which would be more useful in this regard) to SQL statements.

What this means in practice is using ORM frameworks which require you to put decorators (which are still somehow "experimental" despite all major frameworks relying on them) on your class fields to generate sql commands.

But you also need to handle user input, and validate it. You can use JSONSchemas in some frameworks (fastify), but there's no really good way to generate these automatically yet, and you'll need to update them as you add more fields. This is most easily done through (a lot) more decorators

Additionally, because there's no RTTI, you can't rely on the typescript operators like keyof to generate other fields at runtime (only at compile time). Let's say you have a query interface you want to write. You can provide the name of a field to filter by, along with a value. This is a JSON POST Body. Maybe you have a model like:

    export class BlogPost {
        title: string;
        body: string;
        postedOn: Date;
        postedBy: string;
    }
To query the query interface, you'll need to declare every field again independently, because you can't apply class validators to the results of keyof operators:

    export class QueryBlogPost {
        @ApiProperty()
        @IsString()
        @IsOptional()
        title?: string;

        @ApiProperty()
        @IsString()
        @IsOptional()
        body?: string;
        
        @ApiProperty()
        @IsString()
        @IsDateString()
        postedOn?: Date;

        @ApiProperty()
        @IsString()
        @IsOptional()
        postedBy?: string;
    }
let's say you want to specify all the fields which you want returned, so you can limit the size of the response (perhaps you don't want to return the blog post body in a search request). Again, you cannot use keyof here to get a list of valid fields at runtime. Instead, you need to specify them manually:

    export class QueryBlogPost {
        @ApiProperty()
        @IsString()
        @IsOptional()
        title?: string;

        @ApiProperty()
        @IsString()
        @IsOptional()
        body?: string;
        
        @ApiProperty()
        @IsString()
        @IsDateString()
        postedOn?: Date;

        @ApiProperty()
        @IsString()
        @IsOptional()
        postedBy?: string;

        @ApiProperty()
        @IsOptional()
        @IsEnum(["title", "body", "postedOn", "postedBy"], {each: true})
        fields?: string[]
    }
If you add a new field, remember to manually add that field to your enum

Don't forget non-primitive types: if you have a nested class, you need to add multiple decorators for that, since you can't get the constructor or type of the class at runtime:

    export class Author {
        @ApiProperty()
        @IsString()
        firstName: string;

        @ApiProperty()
        @IsString()
        lastName: string;         
    }


    export class QueryBlogPost {
        //...
        @ApiProperty()
        @ValidateNested()
        @Type(() => Author)
        @IsOptional()
        author?: Author;
    }
not to mention if it's an array, in which case every class needs @IsArray(), @ValidateNested({each: true}) added to it

Plus all the documentation decorators which add example queries, queries which take arrays (for operators such as "any" or "in".

This isn't to mention return type DTOs, or the decorators for the ORM.

Typescript is a frontend language. It is good for creating data. It is very bad for receiving it. With typescript as a backend, you end up writing the same code 5 times which introduces bugs. Do not write typescript backends just because your junior devs are afraid to learn Java or C# or a language more suited for backend development

comment 3y ago · link · parent

> Sadly, many women have adopted the modern feminist lifestyle and have chosen to sleep around, abort their baby if they unexpectedly get pregnant, and swear off marriage

Bro what the fuck

comment 3y ago · link · parent

I have absolutely no idea what solution exist to this problem, other than making remote work prohibitively expensive. I feel like it's just going to get really painful for these cities for a generation and the US is going to just start flattening out as people move from cities to suburbs

comment 3y ago · link · parent

1. Write your application with a Dockerfile for running it. Will make it dead simple to deploy remotely if you start locally. Services like DigitalOcean let you just point them to a repo with a dockerfile and it will automatically deploy

2. Whatever you're comfortable with, but I personally believe C# is the best language for backend development. But there are web frameworks in literally any language (see: COBOL on Cogs)

comment 3y ago · link · parent

We have none

comment 3y ago · link · parent

I found microdosing cannabis allows me to focus on one thing at a time.

comment 3y ago · link · parent

If we banned political advertising, a lot of the problems involved in campaign finance would disappear. If the only political advocacy you could do was person-person and via debates on network TV, you'd have a lot fewer problems
1
424344
55