Better HN
topnewbestaskshowjobs
Log inSign up

devjab

3,171 karma · joined Dec 3, 2022 (4y ago) · 1,076 submissions

Submissions

comment 1y ago · link · parent

I’m genuinely wondering why you would chose VSC over emacs. Granted, I’m on doom emacs and it’s mainly because I’m too lazy to config Neovim, so it’s not like I’m really a purist. I even use VSC occasionally when I’m in a context on my lovely windows work computers where I don’t have access to WSL, but it’s such a horrible experience. It’s slow, the plugins are ass and the LSPs are horrible for basically anything which isn’t Typescript.

I don’t even think VSC is “that” bad despite what I made it sound like, but it’s probably as temporary as any other modern IDE. In a few years “every” VSC user will probably have moved on to Zed. Meanwhile your emacs (or vim) dot files will setup the only IDE you’ve ever used on any machine.

comment 1y ago · link · parent

If we’re changing unix time we should probably do something about the year 2038 problem. It’ll not be nearly as fun as new years in 2000.

comment 1y ago · link · parent

I'm going to go against the grain on this one but I think it's a good article. I think it should have focused more on the positive sides and the advice and less on the blame game, or even explaining how "weak" engineers survive in organisations. Having spent a couple of decades in the SWE industry, a couple of years in management, I've worked with quite a lot of "weak" senior engineers. In Denmark it's common to take some university level MBA courses as you transition into management and I did that, and it's been helpful as I went back to being an engineer. When I work with a "weak" engineer I let them know they can ask for advice on management if they want to in the most non-intrusive way possible. Some of them do, others don't and I never push it.

What I really like about this article is that it outlines some really good advice. I think the "asshole" part should've been emphasized more. To me you cannot be a "strong" engineer if you're an asshole. Not only will people not want to work with you, but you're extremely likely to lower team morale and create an unproductive work environment. This is where anyone goes from being a "torch bearer" to being "just an employee", and while just doing what you're paid to do is fine in my book, it's when people thrive they have the most fun at work. Another part I think this article could've highlighted more is how you can help juniors find their way into "seniority" by giving them good advice. I don't think you should in anyway undermine a "weak" senior engineer when you do this, but I do think you should nudge people in the right direction. I think you should do this under any circumstance though. You can also be assertive with your "weak" engineer and tell them to not exploit juniors in a nice way. I hate saying "journey" but part of what you should learn as you grow into your career is that it, is, just work. This piece of advice is excellent, since it'll give you a more nuanced view on workplace cutlture and politics. Unproductive people are not your problem, let them be unproductive and let the company handle deal with it. You can be friends with them as the article outlines, but you shouldn't carry them beyond what is reasonable.

What I think the article does wrong is that people transition between these roles more than it outlines. You can be a "strong" engineer in some periods of your life and a "weak" engineer in others. I think it's also important to recognize this in your coworkers. Why are they being unproductive? Is it because their baby has kept them awake for a month straight? Is it because they have been given too much responsibility by the business? Is it because they've been put in the wrong role? There can be a lot of reasons, and I think the most "classic" one is when people don't know how to transition from engineering and into management, or when the business demands that they do 100% of their old job while also managing a team.

I went back to engineering because it turned out I was neurodiverse, and this stressed me out when I had to manage people. One of the sobering lessons I took with me, however, is how replacable we all are. It's always just a question of cost. Similarily when you're hiring for a position, you can basically pick the top 10 candidates and throw a dart arrow at them and be fine. You obviously shouldn't do this, but it's quite a different perspective than what I had from being hired where I figured it was all about being "the best".

comment 1y ago · link · parent

Every SOLID, Clean Code, DRY and so on are all terrible advice sold by a bunch of people who haven’t worked in software development since before Python was invented. Every one of those principles are continently vague so that people like Uncle Bob can claim that you got it wrong when it doesn’t work for you. Uncle Bob is completely correct though, but maybe the reason you many others got it wrong is because the principles are continently vague. Continently because people like Uncle Bob are consultants who are happy to sell your organisation guidance. I think the biggest nail in the coffin of everything from TDD to Clean Architecture should be that they clearly haven’t worked. It’s been more than 20 years and software is more of a mess than if ever was. If all these “best practices” worked, they would have worked by now.

YAGNI is the only principle I’ve seen consistently work. There are no other mantras that work. Abstractions are almost always terrible but even a rule like “if you rewrite it twice” or whatever people come up with aren’t universal. Sometimes you want an abstraction from the beginning, sometimes you never want to abstract. The key is always to keep the cognitive load as low as possible as the author talks about. The same is true for small functions, and I’ve been guilty of this. It’s much worse to have to go through 90 “go to definition” than just read through one long function.

Yet we still teach these bad best practices to young developers under the pretence that it works and that everything else is technical debt. Hah, technical debt doesn’t really exist. If you have to go back and replace part of your Python code with C because it’s become a bottle neck that means you’ve made it. 95% of all software (and this number is angry man yelling at clouds) will never need to scale because it’ll never get more than a few thousand users at best. Even if your software blows up chances are you won’t know where the future bottle necks will be so stop trying to solve them before you run into them.

comment 1y ago · link · parent

Vim/Emacs (and variants) are like a tailored suit. VSC is like an off-the-rack suit. It's a silly analogy but it's probably the easiest way to explain it. For me personally it's productivity, and things like LSP quality in languages which don't have very good VSC plugins. The vim plugin for VSC is pretty bad.

That being said, use what works for you.

comment 1y ago · link · parent

We used runtime assertions both as executable documentation and to avoid system corrution by failing on any false. Since you can't just stop a critical system we would use triple modular redundancy ultimately leading to devices running in a "safe state". If this happened you would need to get your device recalibrated but you wouldn't die.

Base64 would require dynmaic memory, you would likely use a packed struct. How you would do it depends on your compiler, but we would use #pragma.

comment 1y ago · link · parent

IQuerable Inherits IEnumerable and extends it with functionality to lessen the memory loaded when querying a collection (typically when reading from a database). Using IEnumerable can increase memory usage significantly compared to IQuerable.

Not every C# developer knows the difference, in my region of the world it’s an infamous mistake and is often the first thing you look for when tasked with improving bottlenecks in C# backends. On the flip-side, using IQuerable isn’t very efficient if what you wanted was to work on in memory collections.

There is an equally infamous somewhat related issue in Python with list vs generators. Especially common when non Python developers work with Python.

comment 1y ago · link · parent

I actually think the VSC terminal is one of the few saving graces it has. Maybe not so much on *nix. It works well enough on Mac, but it really shines on Windows where you’ll have a much easier time running powershell, GitShell and WSL terminals within VSC than outside of it. It also has really good integration with the various Azure CLI tools.

I don’t think VSC is a very good IDE though. I have no idea why a Vim user would use it instead of upgrading to Neovim, and obviously doom emacs is the best choice but I do think the terminal is actually pretty good in VSC. At least on Windows.

comment 1y ago · link · parent

I’m curious as how it lets you rely less on documentation. If you don’t know what you’re looking for then how will you know you chose the right thing?

The classic example of getting this wrong is probably C# developers using IEnumerable when they should’ve used IQueryable.

comment 1y ago · link · parent

Zig is great, it’s not aiming to be a replacement for C++ though. One of the awesome things about Zig is its interoperability with C. In that sense it’s more of a Typescript to C than Rust is to C++. I’m still not sure what I think about Rust personally. In my region of the world I suspect it’ll continue to struggle to find any form of adoption as the C++ people seem to have very little interest in trading their decade long experience for Rust. Zig on the other hand is winning the hearts and minds of most C programmers I know.

I hope Rust succeeds though. I say this more from a change management perspective than anything else. It’s extremely hard for us to find developers who will primarily work with garbage collected languages but occasionally have to work with either C or C++ when bottle necks appear. Rust makes that much easier, or perhaps less dangerous would be a better term. I’m not sure any of the attempts at making C++ more safe to use is going to really succeed in this regard. Maybe, but I nothing within the C++ community seems to pull in that direction so I doubt it. I’d like to mention that I’m aware that Zig isn’t helpful in this regard either as it’s not memory safe.

comment 1y ago · link · parent

I think that it is interesting that testing plays such a part in these plans. I guess it shouldn’t be a surprise after so many years of TDD, Clean Code and whatever nonsense the pseudo industry of “best practices” has been successfully selling. Odd on its own considering software seems to be just as broken as it was 20 years ago despite all these efforts. Anyway, if it was me I would look closer at how NASA build things. Which includes testing, but the key tool for finding actual programming errors was assertions.

I’ve worked in medial software for a short while. The key features of development when lives are at stake are, assertions, avoid interpretation and no dynamic memory allocation. You should test things, but your assertions should catch any programming errors without a test/debug suite. You should never use an interpreted language, because that is a head ache you don’t want, but you also shouldn’t parse data like JSON. If you need to send data you send bytecode. You do this because you really don’t want dynamic memory allocation in software that will kill people if it fails.

Now a little anecdote. In Denmark we have digital elections, not the voting but the voter registration and the system where each municipality reports the results. These systems run on COBOL and are ancient. There has been multiple attempts to replace them with “modern” software, because the old system can only be run by one private company and that is a monopoly. This is because we privatised the sector 20ish years ago. Anyway, every attempt at replacing it with modern long term software has failed, and a big part of the reason is because people have forgotten how to write code which isn’t infected with all sorts of OOP bullshit. So even the best suppliers and large companies like IBM have failed to make something with the same resilience. It’ll be interesting to see if we’re also going to infect embedded software with these things as the public sector decides to enter and hand out “best practices”.

comment 1y ago · link · parent

If every user is collecting 36mb a day like in the story here, your droplet wouldn’t even be capable of serving 500 users a month without hitting your bandwidth limit. With their current rates, your one million requests would cost you around 10 million USD.

comment 1y ago · link · parent

You can do this with a monolith architecture as others point out. It always comes down to governance. With monoliths you risk slowing yourself down in a huge mess of SOLID, DRY and other “clean code” nonsense which means nobody can change anything without it breaking something. Not because any of the OOP principles are wrong on face value, but because they are so extremely vague that nobody ever gets them right. It’s always hilarious to watch Uncle Bob dismiss any criticism with a “they misunderstood the principles” because he’s always completely right. Maybe the principles are just bad when so many people get them wrong? Anyway, microservices don’t protect you from poor governance it just shows up as different problems. I would argue that it’s both extremely easy and common to build a bunch of micro services where nobody knows what effect a change has on others. It comes down to team management, and this is where our industry sucks the most in my experience. It’ll be better once the newer generations of “Team Topologies” enter, but it’ll be a struggle for decades to come if it’ll ever really end. Often it’s completely out of the hands of whatever digitalisation department you have because the organisation views any “IT” as a cost center and never requests things in a way that can be incorporated in any sort of SWE best practice process.

One of the reasons I like Go as a general purpose language is that it often leads to code bases which are easy to change by its simplicity by design. I’ve seen an online bank and a couple of landlord systems (sorry I can’t find the English word for asset and tenant management in a single platform) explode in growth. Largely because switching to Go has made it possible for them to actually deliver what the business needs. Mean while their competition remains stuck with unruly Java or C# code bases where they may be capable of rolling out buggy additions every half year if their organisation is lucky. Which has nothing to do with Go, Java or C# by the way, it has to do with old fashioned OOP architecture and design being way too easy to fuck up. In one shop I worked they had over a thousand C# interfaces which were never consumed by more than one class… Every single one of their tens of thousands of interfaces was in the same folder and namespace… good luck finding the one you need. You could do that with Go, or any language, but chances are you won’t do it if you’re not rolling with one of those older OOP clean code languages. Not doing it with especially C# is harder because abstraction by default is such an ingrained part of the culture around it.

Personally I have a secret affection for Python shops because they are always fast to deliver and terrible in the code. Love it!

comment 1y ago · link · parent

As I understand it most kernel maintainers aren’t looking to replace C with anything.

Zig has much better interoperability with C than Rust, but it’s not memory safe or stable. I think we’ll see quite a lot of Zig adoption in the C world, but I don’t think it’s in direct competition with Rust as such. In my region of the world nobody is adopting Rust, the C++ people are remaining in C++. There was some interest in Rust originally but it never really caught on in any company I know of. Likely for the same reason Go has become huge in younger companies but will not really make its way into companies which are traditionally Java/C# because even if it made sense technically (and it probably doesn’t) it’s a huge change management task. Zig is seeing traction for programs without the need for dynamic memory allocation, but not much beyond that.

comment 1y ago · link · parent

If you’re into it I suggest you try some pen and paper role playing. I’ve done various forms of communication courses on bachelor level as part of transitioning into management. Part of this is role playing and so on. I’ve done various HR workshops and I’ve read books on the subject and so on.

Nothing I’ve done has come close to improving my ability to ask questions compared to playing adnd 2e (because I’m old). Dungeon master is obviously where it’s best, but you’ll pick up a lot of tricks from experienced GMs even if you’re a noob player. It’ll also be one of the few places you’ll learn to communicate with a variety of people you typically won’t meet.

comment 1y ago · link · parent

I would argue that it’s not really a tech lead if they haven’t setup their pipeline to include linting. It takes such a small amount of time, much less than posting comments about it on multiple tickets. Like who on earth cares about these things in 2024? You shouldn’t be capable or even reaching a point on a pull request without adhering to whatever standards are set in place by the tech lead.

There isn’t really a “right” answer. I tend to include the team in the decisions. Then once you’ve chosen a set of rules all you have to do is enforce them.

comment 1y ago · link · parent

It could be saved on devices and supplied as needed from that device history. They wouldn’t need to keep it on their servers. I don’t think you can fault signal for not wanting to do that, but it also means signal is a terrible communications platform if you want that sort of thing.

comment 1y ago · link · parent

Well, who other than you would need to know about your commented out code? I’m not suggesting you keep the commented out code as part of your git history, that would never be allowed through a pull request. The changes will be there in the history though, I doubt you’ll need to go back for them, but you could.

comment 1y ago · link · parent

Well yes, but you’re not leaving commented out code for anyone other than you. A “sane” git structure will automatically decline your pull request if it contains commented out code.

I say “sane” because I know a lot of places probably allow you to do it. You really don’t want to pollute a code base like that though.

comment 1y ago · link · parent

I never understood commenting out code when you have version control. I get why people do it, I’ve done it myself and then two days later been confused which of the 3 commented out function was actually the most recent. It’s infinitely more clear from the version control since the history is there for you to zoom through.

comment 1y ago · link · parent

In Denmark there is some part of legalese being the way it is because of what you talk about here. Legalese is essentially something you write for a “compiler”. Unlike a compiler, however, the legal system isn’t going to throw up and tell you that you are wrong when they interpret your legalese. Well I suppose it’s a little like JavaScript where it’ll continue and just replace bad parts with “any”. Which is bad if you intended a part of a contract to mean something very specific.

comment 1y ago · link · parent

I’m not sure you’re going to find a lot of sympathy for SoMe platforms in many European countries. Maybe you would have before Twitter was bought and a lot of the “media elite” used it. Today I think you’d mostly find a lot of happy parents applauding you if you were the first politician to manage to ban something like Tik-Tok, Facebook or similar. Not that I’m trying to justify it. I both think the way that it’s being done is wrong and that a lot of people will miss the open web more than they think.

Not holding big tech companies responsible for the content which is housed on their platforms was always a one way street into heavy regulation here in the EU. As with everything EU it takes decades, but I fully expect us to eventually ban many social media products. Or get left by them because it will not be possible for them to make money if they actually have to be custodians of their content.

comment 1y ago · link · parent

Which statistics are those? https://knowledge.wharton.upenn.edu/podcast/knowledge-at-wha... seems to indicate that 45 or 55 are the “best” ages to start a business. And since the average was 42 between 2007 and 2014 it would seem to indicate that at least a good amount of founders are “old”.

If I were to guess I think most founders would be either young or above middle age. Living “poor” is less of a problem when you’re young, and then once your children grow up and you have both experience and stable finances you’re again free of a lot of life’s responsibilities. Meanwhile you’re likely going to be struggling to even find enough hours in your life to take a shower in your 30-40ies with small kids and jobs, and you’re also likely to actually depend on paychecks during this period.

comment 1y ago · link · parent

> What you'll see first is how single sided it is. This cannot be a coincidence.

It’s not a coincidence. Russia invaded a European country and for the first time since WW2 we are in what is essentially war time. You may not know this, but Russia has long been a bully. Every year we have a democratic meeting called Folkemødet here in Denmark. It’s where the political top and our media meets the public for several days. When I went there Russian bombers violated our Airspace during a practice run of nuclear bombing the event. Now they are in an active war with a European country and they are threatening the rest of us with total war basically every other day.

Of course it’s one sided. Russia has chosen to become an enemy of Europe and we will be lucky if we can avoid a direct conflict with them. We are already seeing attacks on our infrastructure both digital and physical around in the EU. We’ve seen assassinations carried out inside our countries, and things aren’t looking to improve any time soon.

What “sides” is it you think there are? If Russia didn’t want to be an enemy of Europe they could withdraw their forces and stop being at war with our neighbours.

comment 1y ago · link · parent

Well, you need an X account, so too high?

comment 1y ago · link · parent

Well, we did build around 1000 solar plants globally with the invested money. I do wonder what you’re doing on HN if you don’t like investment banks though.
1
678
36