CodeBlooded

@CodeBlooded@programming.dev
0 Post – 58 Comments
Joined 1 years ago

I was so relieved to never need VM’s again after discovering Docker.

If this language feature is annoying to you, you are the problem. You 👏are 👏 the 👏 reason 👏 it 👏 exists.

I worked in places where the developers loaded their code full of unused variables and dead code. It costs a lot of time reasoning about it during pull request and it costs a lot of time arguing with coworkers who swear that they’re going to need that code in there next week (they never need that code).

This is a very attractive feature for a programming language in my opinion.

PS: I’m still denying your pull request if you try to comment the code instead.

❗️EDIT: A lot of y’all have never been to programming hell and it shows. 🪖 I’m telling you, I’ve fixed bayonets in the trenches of dynamically typed Python, I’ve braved the rice paddies of CICD YAML mines, I’ve queried alongside SQL Team Six; I’ve seen things in production, things you’ll probably never see… things you should never see. It’s easy to be against an opinionated compiler having such a feature, but when you watch a prod deployment blow up on a Friday afternoon without an easy option to rollback AND hours later you find the bug after you were stalled by dead code, it changes you. Then… then you start to appreciate opinionated features like this one. 🫡

27 more...

Real talk- I agree with this meme as truth.

The more and more I use CICD tools, the more I see value in scripting out my deployment with shell scripts and Dockerfiles that can be run anywhere, to include within a CICD tool.

This way, the CICD tool is merely a launch point for the aforementioned deployment scripts, and its only other responsibility is injecting deployment tokens and credentials into the scripts as necessary.

Anyone else in the same boat as me?

I’d be curious to hear about projects where my approach would not work, if anyone is willing to share!

Edit: In no way does my approach to deployment reduce my appreciation for the efforts required to make a CICD pipeline happen. I’m just saying that in my experience, I don’t find most CICD platforms’ features to be necessary.

11 more...

As of this last month, Lemmy is my new “go to” for scrolling social media. My Reddit usage is probably 20% or less of what it used to be.

A part of this was Voyager’s Progressive Web App (https://vger.app), it made me feel right at home after Apollo shut down.

Think about this: Why are there so many automobiles? And why are so many new models still being made? I would think you would try to perfect what you have instead of making new ones all the time. I understand you need new automobiles sometimes, like construction equipment trucks or some treaded military tanks. But for average daily driver you would think there would be some kind of universal automobile. I drive a Corolla btw. I like automobiles. But was just wondering.

I’m not here to mock you, just providing an analogy. You can deliver just about anything in one language that you can with another. However, like the car, you might need a different type if you want more performance. Maybe you want a fast car. High performance cars often need a lot of attention, they need that premium gas, the mechanics demand higher pay! What if you only care about getting from point A to point B, and you’re more concerned with driving a car that’s cheaper to maintain, maybe there are just more car mechanics for that type of car, and the cost to pay them is cheaper.

A C application that is very well tuned to manage memory and threads in the name of perfect performance will require more time and computer science knowledge to create when compared to a Python script that does the same thing, but in the most basic possible way running on a single CPU, running hundreds of time slower.

Sometimes you need the performance, and often you don’t. Sometimes you need a treaded tank, sometimes you need a NASCAR, and most days the Corolla does just fine, it’ll even let you miss a few oil changes before things get bad.

As to why we don’t perfect what we have now instead of creating more: technology changes, easier to work with abstractions come about, some people enjoy the hobby of creating a language, or maybe a niche language comes about with very specific trade offs for a very specific purpose, no one wants to break backwards compatibility by adding new features and syntax to their language - I’m sure there’s tons more reasons to list.

The misconception that we’re the person to go to to fix your printer…

..I mean we probably can fix it, but it’s a waste of our time…

You can have my Docker development environment when you pry it from my cold dead hands!

2 more...

I feel your pain. I once worked at a place that hired an “expert” as a senior dev who asked me on the first day, “what is this import on the first line of this code??? I’ve never seen this before. 🤔” They were unfamiliar with the concept of packages and importing them… Senior dev, hired specifically because they were an expert in a specific language…

They’d call me upwards of 12 times a day for help with the most basic of tasks with anything technical, to include how to install the basic runtime to be able to run code in that language.

(I’m speaking quasi cryptically on purpose.)

many american companies being able to pay 200-400k usd a year while its hard to get past 100k usd in the richer countries of Europe

The way you word this makes it sound like it would be the opposite of “hard” to achieve 200k-400k in the United States.

What has convinced you that 200k-400k is some sort of average developer pay in the United States?

Is Europe no longer considered western?

5 more...

Code never lies. Comments sometimes do.

2 more...

Go programmer here: What does Go’s simplicity have to do with dependency injection? What does a language itself have to do with dependency injection?

Reading your post and not being personally familiar with your work, I do wonder, perhaps your “extremely complex projects” wouldn’t be so extremely complex if you practiced dependency injection?

How do you unit test your extremely complex projects if your business logic carries the additional responsibility of creating objects?

3 more...

First thing: Ubuntu is the right choice. As far as I’m aware, having run Linux as my main desktop OS for almost a decade and playing with several flavors (…which includes Arch btw 😎), it’s the most polished out of the box desktop experience for someone completely new. It will also likely be the OS with the most Q&A existing on the web for problems you won’t be the first to have encountered.

Secondly, and maybe this should be first, and it sounds like you’ve already got this part down: you have to want to do this. Linux is just not mainstream for the majority of desktop computer users. If you’re not really wanting to do this, you’ll be frustrated when this isn’t the same experience as Windows. (but it sounds like you’re sick of the Windows experience. That’s what started me into Linux years ago.)

Lastly, as far as my quick Lemmy comment goes: Embrace the terminal! You can get around for a while as a Linux n00b on Ubuntu without opening that terminal, but at the end of the day, the *nix shell commands are what make working with Linux great.

The switch will take time. You’ll occasionally need to look up how to do stuff that may have felt simple in Windows… and that will usually be installing and running software that targets Windows only. However, the support for that sort of stuff gets better and better with time. Wine🍷 has come a long way.

It’s worth the journey IMO. For me, I was a PC gamer and I jumped straight into Linux with 0 experience. I learned a lot, spending a lot of time trying to make my Windows games run on Linux. Friends at LAN parties would joke about how I’d spend half the LAN party trying to get my games to run right.

The jokes were a good laugh, but my career shifted since then and my Linux experience carried right over into software development. Everything I deploy is on Linux servers or in Docker containers. All those years fooling around and tinkering with Linux as a PC gamer were loading me with experience that people would pay me for one day.

Good luck! 🐧

….I’ve been using :wq for years…

4 more...

We should all be using Signal, all of the time. It’s accessible to those not technically inclined, and I feel like that’s a requirement now if a personal-use technology wants to get off the ground.

Edit: this is not to detract from matrix, which seems like a great technology for privacy

2 more...

In my experience, 9/10 times a stored procedure is code that should just be SQL executed from your application (as in, your application sends the query text to the db, rather than that text being stored in the database and executed via calling a stored procedure).

If it’s necessary for performance, sure, go for it. Satisfy your requirements. If it’s not necessary for performance, ask yourself why it needs to be a stored procedure deployed to the database.

4 more...

I’ve found Docker helpful when I want to use it to build binaries or use CLI tools that may not be available directly on the CICD platform. Also, Docker makes it easier to run the same code on MacOS that I ended up running on a Linux CICD server.

What would you consider to be overuse of containers?

Single responsibility principle: is your GetData() function responsible for getting data? Or is it responsible for creating a new database connection and also using that to go get the data?

Start naming your functions by what they really do. When you see the word “and” in your function name, you know your function is responsible for too much.

Dependency injection is the difference between CreateDatabaseConnectionAndGetData() and GetData(connection ConnectionType).

In the first example, that function will always connect to the specific db that you hard coded in it. It probably has to also read in a config file to get the connection details. Maybe you should name it ReadConfigAndCreateDatabaseConnectionAndGetData()?

In the second example, I can pass in a MySQL connection or PostgreSQL connection, or some dummy connection for testing.

Keep all that nasty dirty untestable code in one place and spare your business logic from owning all of that.

11 more...

WASM is simply further down the rabbit hole for someone who is new to programming (but not someone who’s already a programmer and just doesn’t focus on web dev today). You are likely far less beginner than you think if you’re making decisions like “I’m going to compile my software written in Rust targeting WASM so I can demo it.”

Ah yes, the project that nobody asked for, and it has to be worth it because you still have your actual assigned work to hack.

I remember that feeling of not seeing the light at the end of the tunnel while having invested multiple days into a side quest that my boss never asked for (but would ultimately make me, or the team, more productive). I remember being more junior in my career and fighting that devil on my shoulder as it’s saying, “it’s turned into spaghetti! Just abandon it and get back to your deadlines before you go too far!”

The meme itself isn’t bashing Docker.

Docker builds are not reproducible

What makes you say that?

My team relies on Docker because it is reproducible…

12 more...

Docker is like, my favorite utility tool, for both deployment AND development (my replacement for Python virtual environments). I wanted to hear more of why I shouldn’t use it also.

1 more...

I’m in this boat. I just want to see lemmy succeed as a legit Reddit alternative.

Edit: WefWef has made me feel right at home, coming from the Apollo app. If you haven’t tried it, check it out! (https://wefwef.app)

My condolences. This is the stuff Robert C. Martin talks about in his book “Clean Architecture”; database vendors locking you into their tech.

Your boss isn’t just a developer, he’s a *db developer *. From his perspective, the database is a god rather than a means to store information.

I should add onto my original post that the queries should strive to be as database agnostic as possible. This alleviates a lot of pain when the company decides to move from one DBMS to another.

Is it safe to assume your stored procedures have lots of DBMS specific functions and syntax sprinkled among the code?

I find Go to be a great language. I read a couple of books on Go as I started learning it, and I learned about some of the items that the author is complaining from those books ahead of time (rather than encountering them as some sort of surprise or bug).

None of the author’s complaints with the language gained traction with me. I understand the complaints, but my reaction certainly wasn’t “I’m lying to myself about this so I can enjoy this language.” Perhaps it’s because my exposure to Go has been more limited than the author’s, or maybe Go is a great language and these complaints are just language features or trade offs that are good to be made aware of. 🤷‍♂️

…one of my early uses of Go was making libraries to be consumed from in a different language’s runtime. This was something the author made sound horrific, but something I was doing as a relatively new person to Go. I had to learn “how” to do it, but it certainly didn’t leave me feeling like it was “extremely hard.”

Does your ad blocker block ads for YouTube and YouTube Music apps on iOS?

10 more...

Python, and dynamically typed languages in general, are known as being great for beginners. However, I feel that while they’re fun for beginners, they should only be used if you really know what you’re doing, as the code can get messy real fast without some guard rails in place (static typing being a big one).

Not sure why downvoted. HTMX does seem to be becoming popular. I prefer the simplicity of it.

1 more...

“Did I say ‘we want it to do this OR that?’ I meant we wanted it to do this ‘AND’ that!” 🤦‍♂️

This was oddly specific 🤔

Fair!

Python, and its need for virtual environments, is what really drove me to master Docker.

Hey, you are actually double booked for the nth meeting for annual “Goals” that’s coming up!

I love to see a new Dart / Flutter project take off!

Hello, Apollo user. Have you tried wefef.app?

I concur, it is a problem with that workplace. (In this case, OP is just sharing a funny meme. I wouldn’t suggest this meme means they’re a problem. I could have made this meme and I love the feature.)

Developing on a team at a company is like the “Wild West.” What’s considered to be acceptable will not only vary from workplace to workplace, but it can also fluctuate as developers and managers come and Go. Each of them have their own unique personality with their own outlook on what “quality” code looks like. (And many of them do not care about code quality whatsoever. They just need to survive 1-2 years there, make management happy with speedy deliveries, and then they can move on to the next company with a 30% pay bump.)

Having experienced working with developers who frequently filled with code base with unused code while having no control over who will leave or join as a contributor to the code base, I think features like this make for a more sane development experience when you’re developing with a team of seemingly random people that you never personally invited to contribute to the code base.

will not merge your PR unless the stricter rules are met.

This doesn’t fly when you work in big corporate and the boss doesn’t care about the code meeting stricter rules. “A working prototype? No it’s not- that’s an MVP! Deploy it to production now and move onto the next project!

This is the way.

Most of those things mentioned aren’t bona fide needs for me. Once a developer is deploying their project, they’re watching it go through the pipeline so they can quickly respond to issues and validate that everything in production looks good before they switch contexts to something else.

I see what you’re saying though, depending on what exactly is being deployed, the policies of your organization, and maybe expectations that developers are working in another context once they kick off a deployment, it could be necessary to have alerting like that. In that case it may be wise to flex some features of your CICD platform (or build a more robust script for deployment that can handle error alerting, which may or may not be worth it).

What app did you end up liking?

1 more...

This is certainly a “pro.” However, I’ve never had an issue swapping phones with Signal. (I do lose my chat history, but I can’t remember if that’s my doing or if signal just can’t port history to a new device.)

I’m going to have to give Matrix a try. I’ve been seeing it mentioned a lot over the past week.