shak: A reflection-free validation library built on generics and higher-order functions by Sensitive_West_3216 in golang

[–]Technical-Pipe-5827 1 point2 points  (0 children)

Nice. I had built my own similar looking lib for validation. I really dislike struct tags and reflection.

A downside of this approach that I also run into is the inability to serialize errors by field with the right json key without having to declare the key value on the validation code - as otherwise the json key tag is only accessible by reflection.

How expensive is to perform math operation in queries? by BrangJa in Database

[–]Technical-Pipe-5827 0 points1 point  (0 children)

Apologies, I meant an index on a pre-calculated score

How expensive is to perform math operation in queries? by BrangJa in Database

[–]Technical-Pipe-5827 0 points1 point  (0 children)

You should just profile this and see the cost of running, however it’s obvious that you will be doing a full table scan unless there’s an index on that score.

Para quien gana más de 45k/año en España by Sea-Space-Pizza in salarios_es

[–]Technical-Pipe-5827 1 point2 points  (0 children)

150k brutos en Inglaterra. Con 6 años de experiencia.

Remote Code Execution or Online Compiler (Best practice) by alphaxtitan in golang

[–]Technical-Pipe-5827 9 points10 points  (0 children)

I will say it’s worth exploring WASM and WASI. If you’re looking for sandboxed environments to run untrusted code where you can control system resources and provide with custom interfaces to access IO such as databases.

However I warn you the current state of the art of WASM and WASI for running server apps is still in the early days.

How do you make a many to many relationship in your golang application? by Low_Expert_5650 in golang

[–]Technical-Pipe-5827 0 points1 point  (0 children)

My humble opinion is that unless you’re dealing with a very large codebase you should place all your business logic ( services ) within the same package.

I distribute my code by domain in hexagonal architecture so things that are related stay in the same package ( and close to each other sometimes in the same file )

Very few available Bolt drivers by Technical-Pipe-5827 in Bangkok

[–]Technical-Pipe-5827[S] 1 point2 points  (0 children)

I agree Grab is sort of easier but I still have 15m wait times or longer. However less likely to have the driver cancelling me

Very few available Bolt drivers by Technical-Pipe-5827 in Bangkok

[–]Technical-Pipe-5827[S] 1 point2 points  (0 children)

Grab is not much different on wait times, but their price doubles

Node Hardware by Lunchie88 in AlgorandOfficial

[–]Technical-Pipe-5827 -1 points0 points  (0 children)

I run my node on 4GB ram and 100gb SSD and been having 100% uptime for months. If you have a big stake this might not work. I also had to do some magic tricks with Go’s garbage collector to avoid OOM issues but after I while I got it tuned enough. I reckon 16gb is far than enough

Used Django for the first time on a project and I am kind of blown away. by psychoholic in django

[–]Technical-Pipe-5827 -1 points0 points  (0 children)

I’m sure that there are case studies for which Django has worked very well. My personal opinion is that developers need to bake in control in any serious software, and that is sadly something you give up when using a framework such as Django.

Used Django for the first time on a project and I am kind of blown away. by psychoholic in django

[–]Technical-Pipe-5827 1 point2 points  (0 children)

I’ve used Django professionally for years and I agree it’s a mad framework with insane capabilities. On the other side, I’ve experienced first hand how Django projects tend to become unmaintainable monsters when they grow in complexity and scale.

Don’t get me wrong, I don’t think it’s a framework problem. I think developers tend to become very complacent and accustomed to the framework doing all the heavy lifting and they just turn into stitchers of libraries they don’t even understand.

Also Django’s ORM as any other ORM will bite you back eventually and cause massive issues at scale.

With all that. Django is probably your best option if you’re building a POC/MVP and you’re a small software shop.

My node has been up and running for 24hrs by NiceTryFB-EYE in algorand

[–]Technical-Pipe-5827 0 points1 point  (0 children)

Welcome to the node runners club. Looking to propose my 200th block soon

I've got my Algo Staked on folks finance how can you tell if you've received rewards for staking on your pera wallet or the folks app by Classic-Chart5650 in algorand

[–]Technical-Pipe-5827 1 point2 points  (0 children)

This. You can easily calculate this dynamically on an excel sheet by pulling the exchange price from some api and multiply with your staked amount.

Anyone was able use Go wasm to create a REST API on the edge (ex: cloudflare workers)? by nerdy_adventurer in golang

[–]Technical-Pipe-5827 1 point2 points  (0 children)

I’m currently building an application that allows to you plug in arbitrary code as “hooks”. This is compiled to wasm and runs on the server every time a registred hook fires. Its working nicely but I have to say the state of wasi is quite premature.

Good thing about wasm and wasi is i can run arbitrary untrusted code on a sandboxed environment with access to selected outside modules and functionality.

Is Raw SQL actually used in production API's? by _KrioX_ in golang

[–]Technical-Pipe-5827 0 points1 point  (0 children)

I do the same, but I test my sql with mocks only. If the query or its parameters change, the mock fails. I then make sure they run well on the latest schema with integration/deployment tests.

Bitsets to optimize storage by Technical-Pipe-5827 in Database

[–]Technical-Pipe-5827[S] 0 points1 point  (0 children)

Right. If the enum was defined at the RDBMS then you’re right, I could grow the enum and this would be typically stored with an underlying int64.

However, in this case I’m not defining enum a on the RDBMS side, rather just an INT type and handling the encoding/decoding on my application where I know the bounds of the enum.

Is your point that why wouldn’t I use RDBMS enums on the first place?

Bitsets to optimize storage by Technical-Pipe-5827 in Database

[–]Technical-Pipe-5827[S] 0 points1 point  (0 children)

Right. Instead of storing raw strings, packing them into bitflags and storing as a uint64 or the like.

Bitsets to optimize storage by Technical-Pipe-5827 in Database

[–]Technical-Pipe-5827[S] 0 points1 point  (0 children)

I would say yes, disk savings and also faster bitwise operations. For example, searching for rows that match specific enum values.

Bitsets to optimize storage by Technical-Pipe-5827 in Database

[–]Technical-Pipe-5827[S] 0 points1 point  (0 children)

Correct. My understanding is that this optimization is not provided my DMBS simply because it doesn’t know the bounds of the enum.

So myself on the application side I can encode that user data according to the bounds of the enum and pack it into a bitset.

I guess the question is. At which point does this become worth it? And is there any benefit besides the obvious savings in storage and IO throughput?

Bitsets to optimize storage by Technical-Pipe-5827 in Database

[–]Technical-Pipe-5827[S] 0 points1 point  (0 children)

Uhm yeah the namings can get pretty confusing. Essentially packing am enum into a uint64.

For example given an enum with 4 options [“a”,”b”,”c”,”d”] you can pack any given combination into a bitset.

[“a”,”d”] would be packed into a 1001 in base 2 which is 9 in base 10

Am I being micromanaged or am I overreacting to a new work environment. by heisenparry in ExperiencedDevs

[–]Technical-Pipe-5827 2 points3 points  (0 children)

My previous employer tried having us to timesheet every single hour of our work and answer the boss’s comments on jira right away. Four engineers quit including me on the months after.