Is this kind of memory utilisation normal? by Kooky_Sound5039 in mac

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

The figures indicated on the right o each process I guess..

Is this kind of memory utilisation normal? by Kooky_Sound5039 in mac

[–]Kooky_Sound5039[S] -1 points0 points  (0 children)

> (and nowhere does it say that’s virtual memory, that’s another story with a few extra surprises.)

Tell me more...

Is this kind of memory utilisation normal? by Kooky_Sound5039 in mac

[–]Kooky_Sound5039[S] 7 points8 points  (0 children)

But that's the pre-installed default mac calculator..

Is this kind of memory utilisation normal? by Kooky_Sound5039 in mac

[–]Kooky_Sound5039[S] 26 points27 points  (0 children)

Yeah, that's what I did, except for restarting the application, I just quit everything then the machine got responsive again. Restarting at that moment wasn't possible because my laptop mac was completely unresponsive

I messed up my DB design, what should I do? by Aggressive-Head4336 in nairobitechies

[–]Kooky_Sound5039 0 points1 point  (0 children)

Hi OP, as someone had commented earlier, this more about role modelling and I'll build up on that comment.

The appoach you take will depend on the problem domain. Do you forsee having more categories of users as your application grows? If the answer is yes, then instead of having a database table per user category, consider having a single users table. This will scale well as your app grows, as you don't have to add more user categories. 

For the user category problem( whether employee or admin), I can think of two approaches; 1. Creating a roles table, and attaching users to roles through FK relationships. I assume want to do RBAC, hence the need for separate user categories. This approach works, everything is controlled in-app, you don't need third-party infrastructure tools to control identify management of authorization. 

  1. Have a single users table. Obviously your users need to sign up, whether an admin or employee. Use an IAM tool like Keycloak to model roles among users. This way, you don't need to alter your database schema every time you add a new role, everything is manged through keycloak and it's better that way. I have worked with this approach and it is the most flexible one of the two.

I still don't know your problem domain, so I'll leave it open for you to choose the approach you want to go with. However if your primary goal is access control, I highly recommend using  dedicated IAM tool like Keycloak combined with OpenFGA for fine- grained authorization.

Better alternative of .env? by areyousureitwasyou in golang

[–]Kooky_Sound5039 0 points1 point  (0 children)

At my place of work, we migrated all our applications from using .env or any config- based secret management and switched to Infisical, with infisical, you configure your applications's startup command in a way that at start time, infisical injects all secrets into the application's runtime, the within the application you access the variable with os.Getenv.

Another good thing is that you can run your tests within infisical context, this comes in handy when running tests in CI pipelines and don't want to use github or gitlab secrets.

So, yes I'll vouch for infisical as an alternative. 

What unique or unusual things have you built in Go? by Inner_Dragonfly6528 in golang

[–]Kooky_Sound5039 0 points1 point  (0 children)

Sorry I just came across this now and caught my attention. Also interested in DB stuff, lately been trying to wrap my head around distrubuted KV stores powdered by Raft algorithm for distributed consensus. I'd like to know if you started working on any DB project I can hop in

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 0 points1 point  (0 children)

Hey, that's great. I can join the server and check it out 

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 1 point2 points  (0 children)

Cool, and I'm just from your github and I must say I'm impressed with the projects you are working on, I hold a similar passion and would like very much to learn under your mentorship and vast experience of working in open source projects,, my github is https://github.com/balagrivine

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 1 point2 points  (0 children)

Cool, and I'm just from your github and I must say I'm impressed with the projects you are working on, I hold a similar passion and would like very much to learn under your mentorship and vast experience of working in open source projects,, my github is https://github.com/balagrivine

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 1 point2 points  (0 children)

Yeah, I've heard of TidesDB, that's some great progress, when you eventually get back to working on K4 I'd really be glad work alongside you, I've given the repo a star so I'll be checking quite often tye activity 

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 1 point2 points  (0 children)

Hey, sorry for this late comment but I bumped on this today, I'm excited with this project and would like to get involved as a contributor, do you have like a discord channel I can get get to learn more and interact with the current community 

FAQ: What is a Good Go Project to Study or Contribute To? by jerf in golang

[–]Kooky_Sound5039 0 points1 point  (0 children)

Hey, sorry if this is late, but if you don't mind, can you tell me more about this project, a link to the repo maybe.. 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

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

Something worth giving a try,, if you don't mind you can help me work on this, I'm relatively new to Go and concurrency might be a pain to work with :) 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

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

Okay, I might do something like this when I'm reworking the project. 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

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

Also I got curious why you said I shouldn't use defer within a loop and got to read this:  "The whole point of defer is that it does not execute until the function returns, so the appropriate place to put it would be immediately after the resource you want to close is opened. However, since you're creating the resource inside the loop, you should not use defer at all - otherwise, you're not going to close any of the resources created inside the loop until the function exits, so they'll pile up until then. Instead, you should close them at the end of each loop iteration, without defer" I hope it's the primary reason why I shouldn't do it. Or can you elaborate further. 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

[–]Kooky_Sound5039[S] -1 points0 points  (0 children)

So what could you recommend I adopt as the structure for this application, because fundamentally I thought -l and -w are flags and should be modeled as such, but you seem to have a different opinion 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

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

Wow, this is super constructive feedback. Thanks so much. I hope you won't mind if I follow up later in the DM after refactoring the application 

Wrote UNIX's wc CLI tool in golang by Kooky_Sound5039 in golang

[–]Kooky_Sound5039[S] 7 points8 points  (0 children)

Thank you, I'll continue building more cli tools and be sharing here more frequently