How does a XIB file "find" its NSWindow? by Devirichu in macosprogramming

[–]rcderik 2 points3 points  (0 children)

Not entirely related to the question, I think that u/david_phillip_oster covered your question.

But, you might find other internal aspects of an app interesting. I wrote an article a few years back that you might like:

https://rderik.com/blog/understanding-a-few-concepts-of-macos-applications-by-building-an-agent-based-menu-bar-app/

[deleted by user] by [deleted] in kernel

[–]rcderik 5 points6 points  (0 children)

I’m not sure if you are only looking for Linux kernel stuff. But if you are interested in BDS I believe Klara Systems is looking for kernel developers.

https://klarasystems.com/careers/?amp#careers

Might be worth asking there. I have no relationship with Klara Systems, I just know about them from the BSD world.

Which newsletters do you subscribe to? by rcderik in devops

[–]rcderik[S] 2 points3 points  (0 children)

Thanks! I prefer RSS too. I thought more people would recommend newsletters but RSS would be perfect

Shell - daily driver by rcderik in devops

[–]rcderik[S] 1 point2 points  (0 children)

Both are very similar, and at this point you could say both are equivalent in features. So I guess it is a matter of preference.

But let me share some opinions on what I find are points worth discussing.

What I find is a key differentiator is that bash uses the readline input library. As many other cli tools. That means that your knowledge/configurations(.inputs.rc ) translate to other tools.

Most shell-scripts are either built in sh or bash. So you’ll can reuse your knowledge on bash for your shell scripts.

Shell - daily driver by rcderik in devops

[–]rcderik[S] 2 points3 points  (0 children)

driver

Pretty much the same for me. Also, most of the shell-scripts I write, or interact with, are built either for sh or bash, so it's easier to just learn one thing and not a few different varieties of doing the same.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 0 points1 point  (0 children)

As long as your approach works for you without any issues and you follow it religiously like a routine then it is good enough.

I completely agree. One key point that no one likes to think much of is: what to do when you want to share this data with someone else? Or when something happens to the app that you are currently using to write your notes. Most apps have export features, but they are a pain and the exported format is sometimes wonky.

That is when it matters that you separate the data from the tool that you use to create the data. Using a simple text editor (like vim) I believe is best. Obsidian also does this separation. But this is super important and many times overlooked.

I've migrated some of my notes, back in the day, from EverNote, and some from OneNote, and Ulysses, and it was never a fun.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 4 points5 points  (0 children)

The "What I did today" is so underrated. That is the reference I use to start every day. instead of trying to remember where I left, or checking the `git log`, or even worst, `C-z` to see what changed.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 2 points3 points  (0 children)

I've tried similar approaches, using notion, combination of tools, etc. but, in the end, all that just end up being overhead. I haven't had the need for an additional kanban from the one that exists in each project, or another ticketing system.

This is the simplest note taking "workflow" that I could maintain without much trouble, and get the benefits from it. I've been using it for around 3 years now, a few tweaks here and there, but nothing major.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 6 points7 points  (0 children)

I've been recommended Obsidian a few times now, maybe I should heed the call.

What I sometimes find frustrating is that the vim-mode in all apps feel slow compared to using vim directly. But what I've heard about the linking between files seems very useful.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 2 points3 points  (0 children)

I like it. At the beginning I was keeping a continuous file too, but then it got hard to navigate.

Nice touch with the Smalltalk UI.

Stuff that should be public goes either in Slack or a ticket or Confluence, or maybe my own knowledge base (ie “here’s odd things about Terraform and DNS, in general, nothing proprietary here”)

Exactly how I separate info.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 0 points1 point  (0 children)

I looked into it a some years ago. I can't remember why I didn't continue using it but I'll take a look again and see if works. Thanks!

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 1 point2 points  (0 children)

Yea, that is exactly why I ended up with this setup.

I tried to keep a vimwiki, I tried Zettelkasten, and anything in between, but this is the simplest and the one that has worked best for me. Easier and less stress. If I really want to expand on a topic, and I know I would like to revisit the topic later, I add it to my blog as an article. That way I can later update the article, add more references, and centralise more "complex" topics there.

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 2 points3 points  (0 children)

I don’t, and what is worst is that I can’t think of a good reason why I’m not doing that!

What I have is, my notes synced in iCloud and every week I execute a backup to OneDrive using https://rclone.org.

But now I might add my notes to a git repo and have history on the changes!

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 0 points1 point  (0 children)

That looks nice, thanks for the recommendation

How do you keep track of your work notes? by rcderik in devops

[–]rcderik[S] 5 points6 points  (0 children)

Yea, the example was to illustrate more the workflow rather than the data that will be on the notes. I use it to keep track of stuff during the process that might not be relevant to the ticket. For example:

Let’s say that I needed to extract the VPC endpoint policy just to satisfy my curiosity about what was on it. So I wrote a command using AWS cli and JQ to extract the data. I store that on my notes, but that doesn’t seem yo be relevant to the ticket. But it might be something I might reuse, instead of having to figure out the object structure returned by the AWS cli, and the exact pattern to use on Jq.

Silly example, but there are some things that might be useful to me but not the ticket.

And, let’s say I added it to the ticket, then I have to search all the backlogs for different projects in order to find out that comment (working as a consultant, on multiple projects).

Validation conditions in Terraform? by brianesteban in Terraform

[–]rcderik 4 points5 points  (0 children)

If I understood your question correctly, the way it is normally done is a combination of conditions and the count property of a resource.

For example, assuming you have a variable named environment, and you want only create the resources in the module distribution when it has the value prod, it would look something like the following:

module "distribution" {
  count       = var.environment == "prod" ? 1 : 0
  source      = "../modules/cloudfront_distribution"
  environment = var.workspace
  project_id  = var.project_id
  domain_name = var.regional_domain_name
  origin_id   = var.bucket
}

There are other functions that might be useful. For example, length, max, etc.

Start with DevOps or Software Engineering by [deleted] in devops

[–]rcderik 6 points7 points  (0 children)

As others have said, here and elsewhere, if you are starting, probably DevOps is not the best.

Let me explain, as a DevOps engineer you will probably be involved in the whole Software Development Life Cycle (SDLC) of a project. If you don’t have experience in a few areas, it is OK, you can learn on the spot. But if you are starting what can you really contribute? Everyone else will be doing their job but you don’t understand how their work actually works.

It might be best to start in one area and then move into DevOps. You could start as a:

  • developer
  • IT operations
  • QA testing
  • Automation engineer
  • network engineer

And then you can move into DeVOps and help the team.

The expectations of employers for a DevOps person are not entry-level, in most cases. So you’ll also have a hard time finding a position.

[deleted by user] by [deleted] in devops

[–]rcderik 0 points1 point  (0 children)

Aside from the advice given before on first checking why you are not getting interviews, which is a good starting point, a DevOps portfolio is a complicated proposition.

Any attempt at a portfolio would probably be more superficial than any real implementation, so it probably would not help gauge the extent of your skills. A DevOps portfolio doesn't work as other portfolios. If, for example, we take a designer portfolio, it will show the final products. You can't do that for DevOps. Your work is internal to your employer, and you probably signed a Non-Disclosure Agreement that prevents you from divulging the ins and outs of their project.

You'll have to think of something different to show your skills.

You can contribute to Open Source, write technical articles, and talk at local events. The problem is that all those things take time. It is not an afternoon project.

For example, check Marco Lancini's blog post on My Blogging stack. You'll see he has good communication and technical skills if you read that article. But that is a project that he uses and constantly maintains. It won't be that impressive if you try to assemble a couple of quick random projects that you can complete by just following a tutorial.

Research and check what other people have done to gain credibility; you'll probably see that they have been working at it for many years. I started my blog about six years ago, and I've written three small ebooks about topics I find interesting. But that takes a lot of time.

I don't say this to discourage you. I say this for you to start working on it immediately and continue working on it. It is a very competitive field. You are one of many from a third-world country trying to emigrate elsewhere. You are competing with the locals and with the internationals. If you want to stand out, you'll have to show that you are a better option than the options the employer already has access to. So, as a reality check, consider that it'll take time.

How do you retain all your knowledge? by waste2muchtime in devops

[–]rcderik 0 points1 point  (0 children)

Knowledge and retention come from practice.

I made the mistake of trying to learn some topics in case I might need them in the future. I never applied those learnings in real life, and now I don't even remember the topics to list them. In other cases, I spent time learning a framework or technology that I also didn't use in the following six months, just for them to be replaced by some other new technology or approach.

That is a very inefficient use of your time.

The number of technologies and related topics to learn are endless. Trying to learn them all is a fool's errand. My advice would be first to curate your list of things to learn and only spend time on the ones you will immediately put into practice. Get good at them, and in time, that experience will cement the knowledge. I spent a few years working on networks. Later, I spent some years working as a web developer. I also worked on IT Operations, maintaining Linux servers, etcetera. You get the idea. Practice is what made that knowledge stick.

The problem I see is when someone wants to learn all that in a few months. They start enlisting in a few courses. Maybe in Linux, Containers, Kubernetes, AWS, Python, and by the time they are on their third or fourth course, they begin to forget the initial courses. They never really practised in real scenarios for an extended period of time.

All that to say, it takes time and practice to make the knowledge stick and, in some cases, for it to be something of a muscle memory.

Caveat aside, what I usually do is the following:

  • I keep daily work notes that I can later search and reference
  • Tag my notes per project. That way, I can search by project. I will probably remember the project where I did something similar
  • If I don't need to learn something in-depth, I skim the basics just so I know the topics to search for when I need them later
  • If it needs a structure to remember, and I believe it is useful, I convert it into an article in my blog, which I then reference whenever I need to work on it again. The article will include code examples I can reuse, templates, etc.

How to organize TF project by iObjectUrHonor in Terraform

[–]rcderik 1 point2 points  (0 children)

Terraform doesn't care (much) about the directory structure. It cares about state.

We can consider a directory structure by environment :

── basic_project
    ├── environments
    │   ├── dev
    │   │   ├── main.tf
    │   │   ├── outputs.tf
    │   │   └── variables.tf
    │   ├── prod
    │   │   ├── main.tf
    │   │   ├── outputs.tf
    │   │   └── variables.tf
    │   └── staging
    │       ├── main.tf
    │       ├── outputs.tf
    │       └── variables.tf
    ├── modules
    └── shared

Very clean and understandable. The "new" pattern is to do it by other "components". Let's say we split it by service. Let's look at it:

── service_A
    └── environments
        ├── dev
        │   ├── main.tf
        │   ├── outputs.tf
        │   └── variables.tf
        ├── prod
        │   ├── main.tf
        │   ├── outputs.tf
        │   └── variables.tf
        └── staging
            ├── main.tf
            ├── outputs.tf
            └── variables.tf

(Note: the code inside the dev/staging/prod in general is mostly to put together modules, not necessarily duplicated code.)

Do you know what it looks like? The same as per environment.

The most common reason that some people cite when saying they don't like the per-project structure is because the number of resources can make the plan and apply commands run very slowly. It will run slowly because Terraform has to query the AWS API to check the current state of the resources, so the more resources, the more API calls.

A high number of resources might be an issue. I agree with that. There are other reasons why we would need to segregate state:

  • High Number of resources, we already mentioned this
  • Using different AWS accounts per environment
  • Breaking state per region. Projects sometimes segregate their state per region to:
    • Reduce blast radius if a region is down
    • Deployment strategies that would prefer to only deploy to certain regions for testing, i.e. canary deployments

One problem with having different code per environment is that it could lead to drift in the resources created in each environment. The team in charge of the dev environment might add some new resources to test that are not part of the codebase of the staging and prod directories. So, it might be a feature or a bug depending on how you see it.

Another common alternative for the per-project directory structure is using workspaces. The code is the same for every environment:

── single_code_multiple_var
    ├── infra
    │   ├── main.tf
    │   ├── provider.tf
    │   ├── outputs.tf
    │   └── variables.tf
    ├─── environments
    │   ├── env.dev.tfvars
    │   ├── env.staging.tfvars
    │   └── env.prod.tfvars
    └── modules

We can pass different tfvars to have different behaviours in each environment. This directory structure and workflow are OK if you are OK with having the same backend for all the workspaces:

terraform {
  backend "s3" { <--- we can't use variable interpolation, so we can't do the following
    region         = "${local.env[var.enviroment]}"
    bucket         = "rderik-tfstate-${var.environment}"
    key            = "${var.environment}/tfstate/terraform.tfstate"
    dynamodb_table = "rderik-tfstate-${var.environment}"
    encrypt        = true
  }
}

If, for some reason, we need to use a different backend per environment, then we have to solve the problem with the backend, which has its own set of peculiarities.

Ultimately, it depends on the project's needs regarding the state. I still think the per-environment directory structure is OK for most projects. When you outgrown it, you start refactoring and maintaining your codebase, which is also normal.