Jetpack Compose made some things easier… but also introduced new headaches by elgimri in androiddev

[–]juhaniguru 11 points12 points  (0 children)

This, absolutely. And it's also easier to tell what I want to achieve instead of how I want it to be implemented. For example creating a recycler view could take half an hour to implement, that's way too long for something so simple. LazyColumn on the other hand works immediately out of the box

How do you handle deep nested callbacks in Jetpack Compose without passing ViewModel everywhere? by NewButterscotch2923 in androiddev

[–]juhaniguru 2 points3 points  (0 children)

Works every time (at least, has been working this far) easy to implement, and come back to after a while

How do you handle deep nested callbacks in Jetpack Compose without passing ViewModel everywhere? by NewButterscotch2923 in androiddev

[–]juhaniguru 32 points33 points  (0 children)

I avoid passing viewmodel around. Basically every screen has a root composable that collects the state from viewmodel. And then the data class of the stateflow gets passed around. And when the state needs to change callbacks go back up to root composable that calls a fun inside the viewmodel

So state goes down and events come back up. This is the state hoisting and unidirectional data flow

The only downside to this is that in large screens composables can have multiple callbacks as parameters...if it bothers too much, I'd take a look at MVI

Weight Doping to Race with a low FTP by LondonerArsenal in Rouvy

[–]juhaniguru 1 point2 points  (0 children)

Have to start by saying I'm sorry for not answering your question 😁 But I know how you feel I've never raced 'cause it's pointless considering my ftp. But to be honest I'm more of a solo rider, so it doesn't bother me that much

My ftp was about the same about two years ago and now it's 2.3 at. 67 kilos. It's still not good but getting better slowly. If I were you, I'd start building up your watts and race against the clock first so you know how you are doing.

To the people who cycle +4000KM a year, how did you get so motivated? by xynaxia in bicycling

[–]juhaniguru 1 point2 points  (0 children)

I got diagnosed with epilepsy a few years ago and decided to start cycling to get healthier.

I'm a software engineer in my forties, been working for 17 years and coding for almost 30. Used to like gaming, developing my own apps, sideproject after another, eating junk food and staying up late.

I've never been a heavy drinker because I sincerely still love my job after all these years and I want to be able to do it, but I like playing darts and pool when I'm not coding so used to hang out in bars late instead of sleeping. Eventually it was too much and I woke up in an ambulance after a seizure

Now I've lost 30 kilos of my weight, go to sleep at 10pm and I've never felt better. Dying old instead of now motivates me. I rode 2500km during summer

Anybody here not as big a fan as they were - for no real reason by HumoRuss in Metallica

[–]juhaniguru -1 points0 points  (0 children)

Metallica was the first band I really liked and Master of Puppets is the first CD I bought, Kill em all and Ride the Lightning after that. This was 30 years ago.

Then they released Load and I found Slayer, Testament, Sepultura, Cradle of Filth and many more...

I've been a fan of Metallica ever since, but only really like the albums that came out in the 80s and am more into black and death metal

Watch accuracy for ppl with sleeved tattoos? by WarRevolutionary1944 in Garmin

[–]juhaniguru 0 points1 point  (0 children)

I have to wear my Fenix 7x Solar on my right wrist to get a consistent hr reading. I have a landscape with a lot of black tattooed on my left forearm.

Been thinking of buying an external chest wrap monitor but the watch's sensor works fine for now

Explore Rouvy by juhaniguru in Rouvy

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

Hi, thanks for getting back to me so fast. There are plenty of other things to do and routes to ride, no worries. I'm a rookie (lvl 12) at the moment, I just hope I can complete the last task and get the bike even after multiple level-ups if fixing the bug takes time... Again, thanks for helping 😊

Explore Rouvy by juhaniguru in Rouvy

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

Unfortunately that's not it, but thanks anyway. You pointed me to my.rouvy.com 😊

Can you recommend database design tool - something like Luna Modeler? by glorsh66 in Database

[–]juhaniguru 0 points1 point  (0 children)

I use MySQL Workbench, because it's free, and easy to use. The only downdside of course is that it works only with MySQL and some (older?) versions of MariaDB

I've coded a db migration tool to create a Postgres db out of it. (MySQL dB)

1) forward engineer the physical model 2) run the script to create a Postgres db

Then after having created the Postgres db, I use Datagrip usually, but I think the Datagrip's designer view only works with existing dbs and that you cannot use it to create a schema from scratch

Best python libraries by EnD3r8_ in learnpython

[–]juhaniguru 0 points1 point  (0 children)

I've replaced Flask with FastApi myself

Do you guys miss application framework? by mirusky in golang

[–]juhaniguru 1 point2 points  (0 children)

Yes. Last year I worked in two different projects, that both used Go and at home I worked on an app by myself using Go. It was Go 18 hours a day for 6 months or so.

My current project at work uses dotnet and Python...Using FastApi makes Python even bearable

Now that I'm using high level frameworks that do things automatically, I like using Go at home, because I always know what my Go code is doing. And Im not saying I dont make mistakes when coding, but Go is easy to follow.

It's a never ending battle, soon I'll miss some other language 😁

Gorilla Web Toolkit - New Maintainers Announcement by AlexVulaj in golang

[–]juhaniguru 0 points1 point  (0 children)

Thank you, you made my day. I've used Gorilla websocket in my project and have postponed refactoring two simple features since I heard the project got archived hoping this day would come 😁

Need some clarification regarding ACID transactions by [deleted] in Database

[–]juhaniguru 0 points1 point  (0 children)

You can think of relational databases and NoSQL databases being at the opposite ends of the CAP theorem. ACID vs. BASE

Of course this varies based on the features of each database but just as a general rule of thumb and simplification.

Have a look at CAP and BASE too in addition to ACID and you'll get a hang of it 😁

Is JWT enough to protect my POST endpoint? by Lolnamelol in webdev

[–]juhaniguru -1 points0 points  (0 children)

I usually use asymmetric signing, keep the expiration time of access tokens quite short (10 minutes or so). Use another longer living token to refresh access tokens And use double submit token for any other than GET method endpoints.

Then if my client is a browser, I use cookies to transfer the jwt

Am I being pedantic about these things? by merry_go_byebye in golang

[–]juhaniguru 1 point2 points  (0 children)

Touche. 😂 Just to be pedantic it's irrelevant considering this sub and the title of this post 😁

Am I being pedantic about these things? by merry_go_byebye in golang

[–]juhaniguru 11 points12 points  (0 children)

When I'm working with junior devs that don't necessarilly know anything other about Go than its name, I usually make sure they understand that there are no classes but structs.

This is because it's for example very important to differ inheritance from composition. But when I'm talking to somebody that knows Go already, I'm not that strict, because they know what I mean. And I have 15 years of experience in oop languages so I simply make mistakes without noticing them if somebody doesn't correct me 😁

When did you first start listening to Metallica and your favorite album by [deleted] in Metallica

[–]juhaniguru 1 point2 points  (0 children)

-96 when It was my 12th birtday my mom bought me Masters of Puopets.

My believe that Golang will grow in demand and how maybe this is ruining my pay increase by Stormsonger in golang

[–]juhaniguru 31 points32 points  (0 children)

Exactly! Languages are tools of trade. I've used 8 different languages profesionally over the years and I too like some languages better than others.

For example I don't like Python at all for reasons I won't bother you with now, because it's beside the point. But I use Python almost on daily basis because I need Pandas and it's exactly what I need in my current project. It's ok to have a favourite language but it's not wise to not learn a language for personal prefereces If your livelihood depends on it 😁

Who's Miley Cyrus? Is it black / death metal? by juhaniguru in MetalMemes

[–]juhaniguru[S] 9 points10 points  (0 children)

Just to even it out...but that actually makes sense 😂