marketing – What is the best method of incorporating ads/IAPs into your mobile game as an indie dev in 2020?

As the title reads – since the freemium model seems like the only viable for mobile games right now, which route do you tend to go as solo devs/small studios? Do you incorporate all the IAPs and ads you were planning to right away at launch or do you launch the game without them and wait with adding them until it gets some traction, so as not to scare away the initial userbase? Or maybe you incorporate some ads right away (like the less obtrusive ones – static banners at the bottom, for example) while waiting with interstitials/videos for longer?

Also, did you find like some things are a big no-no or that they simply don’t work like you’d like them to? Like, do you still use forced interstitials every X restarts, for example, or did you move away from this? What are your good practices you try to keep in mind?

Which methods proved more viable to make ends meet for you?

optimization – Is there any good method to find if a grammar is optimal for a problem?

I’ve been thinking about grammatical evolution problems and how the grammar influences the algorithm performance. It came to my mind the huge impact that the grammar that you’re using has in the time that takes an algorithm to reach an optimum solution.

The simplest example would be if your problem doesn’t involve trigonometric operations. If you’re trying to find f(x) = 3x - 1/2, including sins, tangents or square roots in your grammar will, almost certainly, slowen your algorithm as the population complexity will grow. Other not-so-evident simplifications for a grammar would be trigonometric identities:

tan(x) = sen(x) / cos(x)

Talking about this last example, I don’t know how to determine the importance of the impact of including tan(x) between the grammar rules to produce valid solutions. Or in other words, knowing if adding tan(x) will be better in terms of performance than don’t doing it and thus, forcing the evolution to combine two or more operators and terminals to being able to use that operation and making the grammar ambiguous.

So this two are the questions:

  1. Is there any way of knowing if a grammar is optimal for finding a solution?
  2. Which evolutionary algorithm or machine learning method (considering that I’m almost profane in this discipline, some explanation is wellcome) would you use for finding optimal or sub-optimal grammars?

Thanks

Youtube Chanel Promotion – 2020 Real Method for $5

Youtube Chanel Promotion – 2020 Real Method

YouTube +200 Channel Promotion very fast and Non drop

1.100% guaranteed and non drop.
2.extra all bonus.
3.Very fast delivery.
4.We do not use any fake system so your video is safe.
5.I am fast seller.
6.100% Organic and natural promotion.
7.Online support after order complete.

Note: Once you have order this service don’t ask for change this link or cancellation this order.

So Please order me sir and enjoy my service.

.

clean code – Naming conventions for set/unset method parameter

The most important is that the method name reflects a behavior. You do this perfectly well with the Set prefix (if your project indeed doesn’t use lower camel case for method names).

The consumers would then write something very unambiguous and self-documenting:

myobject.SetLock(true);     

As a consumer, I perfectly understand that the parameter name in your interface definition reflects the intended target state that will result from the operation:

SetLock (boolean isLocked);

For the maintainers of this class, the name of the parameter will probably be understood the same way. You just should avoid any confusion with the internal state.
It is nevertheless true that the readability and clarify of the implementing code will have ups and downs:

internallyLocked = isLocked;     // rather clear
if (isLocked) { ... }            // rather ambiguous 

If you want to improve that readability, the problem of your name is not so much the ending of your parameter but its beginning. In all objectivity:

  • if the parameter starts with is, the end should be locked for the sake of grammatical consistency;
  • is prefix suggests a current state when used in the method body. If you want to avoid any potential ambiguity, you could use a less ambiguous prefix to clarify the intention: either reflect a change of state, or a target state.

The exact choice of wording is opinion based. I could think for example of toBeLocked (target state clearly expressed) or willLock (change action clearly expressed). But there are certainly many other possibilities that comply with these basic principles.

100$ A DAY BTC AUTOPILOT METHOD

Follow this method that is noob friendly
https://anonfiles.com/H4RbnaE1o8/Bitcoin_100_Every_Day_pdf

finite element method – Problem with NDSolveValue : “The function value {$Failed} is not a list of numbers with dimensions…”

I was having fun modifying a code given to me as an answer to a previous problem here, courtesy of user Alex Trounev (Thank you again), when I encountered a certain error which I had never seen before.

Here is the aforesaid code :

(*parameters*)
r0 = 0.5;
h = 1;
(Alpha) = 0.8;

(*region definition*)
reg = Cuboid({.5, 0., 0.}, {1., 2 Pi, 1.});

reg3D = ImplicitRegion(
   r0^2 <= x^2 + y^2 <= 1 && 0 <= z <= 1, {x, y, z});

(*equation + conditions*)
eq1 = D(u(t, r, (Theta), z), 
    t) - (D(u(t, r, (Theta), z), r, r) + 
     1/r*D(u(t, r, (Theta), z), r) - 
     1/((Alpha)^2 r^2) D(u(t, r, (Theta), z), (Theta), (Theta)) + 
     D(u(t, r, (Theta), z), z, z));

ic = u(0, r, (Theta), z) == 1;

bc = DirichletCondition(u(t, r, (Theta), z) == Exp(-5 t), r == r0);
nV = NeumannValue(1, r == 1);
pbc = PeriodicBoundaryCondition(u(t, r, (Theta), z), (Theta) == 0, 
   TranslationTransform({0, 2 (Pi)*(Alpha), 0}));


(*solution computation*)
sol = NDSolveValue({eq1 == nV, ic, bc, pbc}, 
   u, {t, 0, 2}, {r, (Theta), z} (Element) reg);

(*frames=Table(DensityPlot3D(sol(t,Sqrt(x^2+y^2),ArcTan(x,y),z),{x,y,
z}(Element)reg3D,ColorFunction(Rule)"Rainbow",OpacityFunction(Rule)
None,Boxed(Rule)False,Axes(Rule)False,PlotRange(Rule){0,1.5},
PlotPoints(Rule)50,PlotLabel(Rule)Row({"t = 
",t}),ColorFunctionScaling(Rule)False),{t,.05,1,.05})
ListAnimate(frames)*)

When I run the code, after some time, I get greeted with the following error :

NDSolveValue::nlnum: The function value {$Failed} is not a list of numbers with dimensions {39639} at {t,u(t,r,(Theta),z),(u^(1,0,0,0))(t,r,(Theta),z)} = {0.0138161,{<<1>>},{-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,<<15>>,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,-4.66626,<<39589>>}}.

When I click on the three dots next to the error, I don’t find any information on the error like it’s usually the case. I then decide to google some answers.
I found some answers here while also trying to comprehend the error by looking at this and finally that answer here.

So if I did understand it correctly, such error arises when you use NDSolve (or NDSolveValue) to get a symbolical solution to your equation, but problems come up when you try to numerically evaluate it for plotting purpose, or when trying to get a symbolical result with a function that requires numerical values ?

In any case, I do not really understand why I get such error as my plot part is currently between (* … *) so it shouldn’t matter. As for the rest of the code, I do not really see an error but I am just a beginner so…

Anyway, can a kind fellow enlighten me please ?

New method to make 6 figure side income $$$

Hi… I wanted to share something with you that I think someone with your capabilities would be interested in, I honestly believe that this is a perfect fit for you.

This is one of those opportunities that can give you back freedom and life choices by allowing you to work from home all you need is the basics like a computer or laptop and the internet to get started.

All you need to do is Email me for details Somiecrucifix@gmail .com to check it out no strings attached…

New method to make 6 figure side income $$$

algorithm – How to make Print() method memory & CPU efficient?

You are receiving n objects in a random order, and you need to print them to stdout correctly ordered by sequence number.

The sequence numbers start from 0 (zero) and you have to wait until you get a complete, unbroken sequence batch of j objects before you output them.

You have to process all objects without loss. The program should exit once it completes outputting the first 50000 objects Batch size j = 100

The object is defined as such:

    {
    "id" : "object_id", // object ID (string)
    "seq" : 0, // object sequence number (int64, 0-49999)
    "data" : "" // ()bytes
    }
    Step                Input Value                Output State j = 1                  Output state j = 3
    0                       6
    1                       0                           0
    2                       4                           0
    3                       2                           0
    4                       1                           0,1,2                               0,1,2
    5                       3                           0,1,2,3,4                           0,1,2
    6                       9                           0,1,2,3,4                           0,1,2
    7                       5                           0,1,2,3,4,5,6                       0,1,2,3,4,5

func (receiver *Receiver) Print(seqNumber uint64, batchSize uint64, outputFile io.Writer) (error, bool) {

    fmt.Fprintf(outputFile, "( ")
    if seqNumber >= receiver.outputSequence.length {
        receiver.outputSequence.bufferSizeIncrease(seqNumber)
    }
    receiver.outputSequence.sequence(seqNumber) = true

    printedCount := uint64(0) // check for MAX_OBJECTS_TO_PRINT
    var nthBatchStartingIndex uint64
    MaxObjectsToPrint := config.GetMaxPrintSize()
Loop:
    for nthBatchStartingIndex < receiver.outputSequence.length { // check unbroken sequence
        var assessIndex = nthBatchStartingIndex
        for j := assessIndex; j < nthBatchStartingIndex+batchSize; j++ { // Assess nth batch
            if j >= receiver.outputSequence.length { //index out of range - edge case
                break Loop
            }
            if receiver.outputSequence.sequence(j) == false {
                break Loop
            }
        }

        count, printThresholdReached := receiver.printAssessedBatchIndexes(assessIndex, printedCount, batchSize, MaxObjectsToPrint, outputFile)
        if printThresholdReached { // print sequence threshold reached MAX_OBJECTS_TO_PRINT
            fmt.Fprintf(outputFile, " )  ")
            fmt.Fprintf(outputFile, " ----for input value %dn", seqNumber)
            return nil, false
        }
        printedCount += count
        if printedCount >= MaxObjectsToPrint { // print sequence threshold reached MAX_OBJECTS_TO_PRINT
            fmt.Fprintf(outputFile, " )  ")
            fmt.Fprintf(outputFile, " ----for input value %dn", seqNumber)
            receiver.Log.Printf("****MaxObjectsToPrint threshold(%d) reached n", MaxObjectsToPrint)
            return nil, false
        }
        nthBatchStartingIndex = assessIndex + batchSize // next batch
    }
    fmt.Fprintf(outputFile, " )  ")
    fmt.Fprintf(outputFile, " ----for input value %dn", seqNumber)
    return nil, true
}

Here is the complete solution, written for this problem.


Print() is the method that does heavy lifting in this code, with varying size of memory & heavy CPU usage:

  1. How to make receiver.outputSequence memory effective by using datastructure other than array? because newBufferSize := 2 * seqNumber is doubling memory…

  2. How to make Print method have effective CPU usage?

object oriented – Can other behavioral OOP design patterns be expressed in terms of Strategy and Template Method Patterns for behaviour parameterization?

I’m studying OOP design patterns in a solution-oriented way which I mean not concentrating just one pattern but with a comparative analysis like their combined or hybrid usages and equivalents in dynamic languages or in functional languages.

As the GoF grouping name behavioral patterns implies, this patterns are for behavior parameterization by utilizing single method dynamic dispatch in terms of polymorphism that OOP languages provides inherently AFAIK. I assume Strategy pattern as the main form of this mechanism and Template method pattern as its derivation which also keeps common code. Is that reasoning right? Can we approach polymorphism in OOP in this way?

If we think outside of OOP there are higher order functions and lambda functions in dynamic languages and functional languages or mix of them. I think that these languages provides only a few patterns/constructs in contrast to the GoF catalog which I map them to Strategy and Template Method Patterns in essence.

With this perspective, I have analyzed other behavioral patterns and then this question can’t get out of my mind. Even if it looks general but I think I’ve tried to be specific, I’m taking the risk of asking here.

Can we do the same job with Strategy or Template patterns instead of Command, Chain of Responsibility or Decorator(Structural but let's assume in this group) for an example in more or less finer design?

Note: I’m not trying to generalize so for example I know Visitor pattern is out of this scope since it solves the expression problem.

c# – Call method by condition

I apologize in advance for my English.

I have a user search method. It’s parameters – login and strict. The last one determines, which method should have been used for search – Equals (strict is true) or Contains (strict is false). How should I implement it? I could do two different methods, but I think it would be code repeating.

    public async Task<List<UserFindInfoDTO>> FindUserByLoginAsync(string login, bool strict)
    {            
        var users = await context.Users
            .Where(u => u.Nickname.Equals(login)) // change on "Contains" if strict is false
            .Select(u => new UserFindInfoDTO
            {
                Status  = u.Status,
                Id = u.Id,
                MiniAvatar =  u.Image,
                Nickname = u.Nickname                    
            })
            .ToListAsync();
            ...
        return users;
    }