Giovanni Montano

Ranch Hand
+ Follow
since Apr 29, 2014
Giovanni likes ...
Android Python Open BSD VI Editor Slackware
Merit badge: grant badges
Based in the Netherlands, I am Italian, this is not my real name, but similar.
Like Running, Bach, Plato, History, Football, Chess, Green tea, anthropology, psychology, statistics.
Android/Java/Python/Emacs with Vim, Machine Learning
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Giovanni Montano

B Collins wrote:Here is the code that works

I'm using

Modifier.border(width: Dp, color: Color, shape: Shape)
Modify element to add border with appearance specified with a width, a color and a shape and clip it.

yes, even better than my snippet
1 week ago

B Collins wrote:
Someone any idea?

For default value of the label do you mean what we usually call an Hint field? The greyed area that gives an example of what you can write?

you can easily do something like this as fast hack

But you may want to instead work on the Styles of the project, or see the internals clicking OutlinedText and playing with the parameters that are assigned by default
4 weeks ago

Tim Holloway wrote:
About the only time I've really felt the lack, in fact, was vocoder stuff. Last time I tried to do a "Battlestar Galactica" Cylon, I couldn't do live input. Had to record and modulate via a DSSI plugin. Vocoder support in software on Linux hasn't been anyone's priority interest.

oh you remembered me that if I had money to spend I would buy also melodyne, is super funny, fortunately i can do something with the inbuilt flex pitch.
Just to disclose my dig piano is a roland fp30x, i just love it and i justify my self thinking is an investment for the children and also a piece of furniture having bought the pedals and a frame, his neutral sound is really cool, and the app to tune it is funny, but VST and pianoteq are arriving to levels that are incredible. but the 3 octave is something i really recommend, i got the last akai, is really cheap(also arthuria is good, by the way i discovered have been bought by the same group). Is going in my backpack together with the notebook,  and is just funny to have enough room to play chords with both hands, and not be limited with the melody. Fits on the desk and are cool to see.
1 month ago

Tim Holloway wrote:
All based on a $35 device that pulls under 5 Watts of power with a 16GB SD card in it.

Is absolutely cool having open source software to make music, audacity is one of the best audio software ever made,
of course it depends from the needs.
Personally I am really into classical music, although I do not have the skills to play I am as avid listener a sound purist, so I am thinking to buy a well known orchestral VST that cost more than 1k, and the same for a couple of piano VST, one with physical modelling, another one with 40Gb of samples.
There are some free VST and they allow to play and have great results although, and the same is for the DAW. Open source should be always endorsed.  Is like the history of editing software tools, we have the well known standard industry and the great GIMP. GIMP is fantastic for a lot of tasks, but of course has some limits. The same for the great Ivory Grand Piano 162 one can get for free, is just fantastic, but of course does not do the extra mile of paid products.

My midi is a 3 octave with pads and knobs, it has mini keys, but is pretty cool because has some velocity, as a "real" piano I use instead a digital one, one of the most famous brands

Said that is fantastic one can use Linux as main OS, in the years some distro based on Arch in my opinion became just awesome

1 month ago
Does somebody do music composition? Here in Netherlands almost all the devs <35 years I know

I find it as a really cool hobby to use the right brain and balance our left brain work.(Yes i know is not super exact to affirm right and left but more o less is like that )

As I own a Mac I paid for Logic Pro and simple plugins and having a lot of fun, I recommend, really relaxing and the entry curve is really low, as also without knowing musical theory one is ready  to make some music and gives that power that I recognize in coding that can virtually do everything, tweaking parameters.

here a sample of something i did combining some "small" musical knowledge to built in loops

please show me yours!
1 month ago

B Collins wrote:Hi

I have an activity with four composables in a colum - a text composable, a radiogroup a Textfield and a button

I would like to access the actual states of all three (text/radiobutton/textfield) to send them via the button with Intent/putExtra to another Activity

But it doesn' t work - can't access the variables/states

Ive created for example for the textfield

oder in the radioGroup

If I try to access them from the button composable it says unsolved Reference ...

if I put them outside the composable (a scope higher)  it says "composables invocation can only happen from the context of the composable function
if I put it in the surface block - then I got a unsolved reference for e.g. textState

I just want the value and not want to change them - need I state hoisting for it? - or works it another way?

Some help of how to do it would be great

state hoisting is going to work, but you can figure out different ways, this is the most common error in compose. i invite you to do a research on the internet so that you can see different cases resolved, and train yourself to avoid this error in future.
Other way to solve this issue is to refer to an external context using the symbol `@`

What is important to understand is that to use Compose there is a special `@Compose` scope, and this usually elicit this error.

This is some theoretic background, cannot help further without having your class
1 month ago

B Collins wrote:Don't understand what you mean

inserting line 8 will work, the reason is that differently from the  views created in xml, the orders in compose are executed consequentially, so the last instruction is going to add on top of the previous ones
1 month ago

No value passed for parameter 'gameList'" but why

Your Adapter is expecting you pass list inside, UserAdapter() does not have a list as parameter

val list = listof<RecipeResponseItem>{
some litem,
other item,
a third item
recyclerView.adapter = UserAdapter(list)

Please bear in mind this is not the recommended way to pass data inside an adapter, usually we use `adapter.setData(yourList)`, also there are different Adapter main constructions. If you want to become an android developer  I suggest to study concept as `LazyColumn` using compose
1 month ago
   insert clip depending by your use case
1 month ago

Weyard Wiz wrote:

Giovanni Montano wrote:
This time I see -1 displayed the first time so its working this way now.

glad to see it helped, I guess the changes suggested worked, just  android studio lately has some cache problems, so changes are not always picked up immediately, at this regard i suggest you to often to seek for  the IDE option`invalidate cache and restart`, you showed some persistence and logical reasoning that could land you to become  a senior in few years.

2 months ago

Junilu Lacar wrote:Here's what I find slows you down:
1. Lack of clarity on what needs to be done
1a. No concrete examples
1b. No clear acceptance criteria

2. Lack of understanding of how it is to be done
2a. Lack of mastery of tools
2b. Lack of domain knowledge

3. Waiting for feedback on what you've done.
3a. Manual testing
3b. Asynchronous communication

There are more...

4 Lack of understanding of Agile roles, what a dev should and should not do, what a designer should and should not do, and so a product owner and tester. Overlapping is always bad
5 Lack of budget/time to invest in clear acceptance and exhaustive acceptance criteria( that is different by 1b)
6 Lack of ability to understand what went wrong in a sprint and keeping repeating the same errors on Monday.
7 Lack of easier task that make the developer relax a bit so to justify more focus on key more complex features.
8 Lack of understanding of what is a minum viable product from the product owner
9 Lack of understanding how agile work from the managers, that make agile more waterfall
10 too many meetings
11 Scrum masters that are not able to jump on daily issues and correct the action

Doc Norton wrote:

Giovanni Montano wrote:The concept of velocity is also linked to estimation.  Bad estimations bring low velocity, the scrum master should be more responsible for that.  So i would focus on estimation metrics, asking why a ticket evaluated as half a day systematically becomes 3 days, and how to solve this. A qualitative insight will do more than a  metric in my opinion

"Bad estimations bring low velocity" - I do not understand the thinking behind this sentence. Can you elaborate?

"I would focus on estimation metrics" - can you give an example of an estimation metric you would use?

Please see my other reply, bad estimations mean a ticket if evaluated for example as a 3 hour effort and then it takes 3 days, so the velocity would be lower than expected.
Estimation metrics means formalize with a benchmark the roadblocks of a team. Retro are usually made in a way that is not productive, so you need to address a velocity problem with a data scientist approach. Then I put the accent on the fact that metrics should be used to get qualitative insights. For instance if from metrics is clear that half of the team does not have some technical skills and are biased to make estimations, then you address the reasons why this happens, and eventually decide to take a new senior, or you invest in education, or you make the daily flow more learning friendly and so on,

Junilu Lacar wrote:

Giovanni Montano wrote:The concept of velocity is also linked to estimation.  Bad estimations bring low velocity, the scrum master should be more responsible for that.  So i would focus on estimation metrics, asking why a ticket evaluated as half a day systematically becomes 3 days, and how to solve this. A qualitative insight will do more than a  metric in my opinion

When you say "bad estimations", what makes them bad?

"how to solve this" -- what's the problem that needs to be solved here? Are the estimates themselves the problem? Are you thinking along the lines of "making better estimates" or something else?

What kind of qualitative insights do you have in mind?

Bad Estimation are bad when manager and/or client think that estimations means when the application is product ready

the problem that needs to be solve is to make happy management and client that see estimation like something binding and not in the agile logic.

Qualitative insight are understanding the root problems, ex. if the team is overloaded velocity would be lower in the long run, so you need to understand if the team is tired or is looking for a new job and care less. Other example the team communicates bad and the features go back and forth in a Jira board because there are not good acceptance criteria, and much more

Sami radwan wrote:I see. But that seems to be an advanced topic for a beginner. So as beginner all my objects should be declared final? For example, In Kotlin language I see most tutorials when they creating objects they use val not var which means that the reference is final even in introductory tutorials.

In Kotlin we try indeed to make everything final.  Please notice I put from now on in bold all the words I deem interesting to seek on the internet to  deep dive to what i am introducing here.

We try to use in fact a special paradigm that is a mix of functional programming and object oriented programming, the two paradigms are not "mutually exclusive" that means they can be both true, you can have structured programming that host both OOP (Object Oriented Programming) concepts as encapsulation, abstraction, inheritance, polymorphism with functional concepts as high order functions, lambda, tuples, currying functions, map/flatmap/filter

In FP(Functional Programming) there is a concept called immutability that plays an important role and is quite essential to try to write less buggy apps, the reason is that pure functional programming(which Kotlin is not) tries to avoid the so called "side effects", a side effect modifies a mutable data structure, this is dangerous and considered evil, because you avoid complex "control structures" that do not help readability and are state error prone, you do not need to manage errors wrapping exceptions, and you have a safer multi-thread/concurrency experience.

Kotlin is largely used with so called reactive concepts as Flow and RXKotlin(that is a wrapper of RXJava) so that you have a mutable object(that varies) and is usually isolated as private in a class and you assign this mutable object  to an immutable public one(that changes via an observer pattern) but offers to the "adapter" part of your architecture (see adapter pattern), an easier plug and play approach, unidirectional flow

As you are following tutorials in Kotlin there is quite a chance you are interested in Android Architectures where all the modern so called stack (API) use in large misure the concept of reactive and immutability via ViewModels and Jetpack Compose
2 months ago

Are you running the app in an emulator or on a device? in both cases, please uninstall and launch it again pressing the run icon. The FIRST time you should see `-1`;
after the first time you should see a value and this value will be "persistent" because you use SharedPreferences, I guess this is the reason why you are seeing US not the xml default value you mention.

In the case you get still `US` and so your reasoning is right , uninstall it again and change the default value to `NL` if the content is NL this means that this string get passed into the SharedPreferences from the first attempt, and so the tutorial  may be wrong, it happens several times even with the official documentation , they gotta produce a lot of codelabs and guides on weekly basis, few developers notice small imperfections
2 months ago